線程同步

今天要寫的小程序是賣票 結果如下:共100張票,10個線程 需要聲明的一些變量: public: volatile int m_tickets;//原子訪問 static unsigned __stdcall ThreadProc(void* lparam); CListBox m_lstbox; map<unsigned int , int> IDMap;//將線程ID和0~10對應
相關文章
相關標籤/搜索