Click here to Skip to main content
15,915,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Critical sections (Moak & Co.) Pin
Joe Woodbury24-Oct-02 11:35
professionalJoe Woodbury24-Oct-02 11:35 
GeneralRe: Critical sections (Moak & Co.) Pin
Rickard Andersson2024-Oct-02 11:40
Rickard Andersson2024-Oct-02 11:40 
GeneralRe: Critical sections (Moak & Co.) Pin
Joe Woodbury24-Oct-02 11:55
professionalJoe Woodbury24-Oct-02 11:55 
GeneralRe: Critical sections (Moak & Co.) Pin
Rickard Andersson2024-Oct-02 21:38
Rickard Andersson2024-Oct-02 21:38 
GeneralRe: Critical sections (Moak & Co.) Pin
Joe Woodbury25-Oct-02 1:09
professionalJoe Woodbury25-Oct-02 1:09 
GeneralRe: Critical sections (Moak & Co.) Pin
Rickard Andersson2025-Oct-02 5:53
Rickard Andersson2025-Oct-02 5:53 
GeneralRe: Critical sections (Moak & Co.) Pin
Joe Woodbury25-Oct-02 6:46
professionalJoe Woodbury25-Oct-02 6:46 
GeneralRe: Critical sections (Moak & Co.) Pin
Moak24-Oct-02 19:35
Moak24-Oct-02 19:35 
Rickard Andersson wrote:
I'm working on a server that will save all clients in a global std::list object. When a client whants to send to another client on the server, the client iterate through the std::list object and send the message to all clients.

Hej Rickard,
with a mutithreading socket concept this is a must have IMHO. Reading isn't critical, but changing or removing elements from a list: Another task could e.g. remove an element from the list (when a client signs off), which could invalid the iterator used by another thread. So, that's why you have to make exclusive access to your global network data, no matter if threads wants to read or write.
GeneralRe: Critical sections (Moak & Co.) Pin
Rickard Andersson2024-Oct-02 21:39
Rickard Andersson2024-Oct-02 21:39 
GeneralRe: Critical sections (Moak & Co.) Pin
Anonymous24-Oct-02 22:08
Anonymous24-Oct-02 22:08 
QuestionHow to detect a CView closing? Pin
Ravi Bhavnani24-Oct-02 11:19
professionalRavi Bhavnani24-Oct-02 11:19 
AnswerRe: How to detect a CView closing? Pin
Ravi Bhavnani24-Oct-02 11:20
professionalRavi Bhavnani24-Oct-02 11:20 
GeneralRe: How to detect a CView closing? Pin
Neville Franks24-Oct-02 12:00
Neville Franks24-Oct-02 12:00 
GeneralRe: How to detect a CView closing? Pin
Ravi Bhavnani25-Oct-02 1:42
professionalRavi Bhavnani25-Oct-02 1:42 
GeneralMenu in a dialog Pin
sikrip24-Oct-02 11:14
sikrip24-Oct-02 11:14 
GeneralRe: Menu in a dialog Pin
Ravi Bhavnani24-Oct-02 11:21
professionalRavi Bhavnani24-Oct-02 11:21 
GeneralRe: Menu in a dialog Pin
Anonymous24-Oct-02 18:35
Anonymous24-Oct-02 18:35 
Generalchange dialog font Pin
lucy24-Oct-02 10:54
lucy24-Oct-02 10:54 
GeneralRe: change dialog font Pin
alex.barylski24-Oct-02 13:24
alex.barylski24-Oct-02 13:24 
GeneralCList and sockaddr_in Pin
User 665824-Oct-02 9:47
User 665824-Oct-02 9:47 
GeneralRe: CList and sockaddr_in Pin
valikac24-Oct-02 9:59
valikac24-Oct-02 9:59 
GeneralRe: CList and sockaddr_in Pin
User 665824-Oct-02 10:19
User 665824-Oct-02 10:19 
GeneralRe: CList and sockaddr_in Pin
valikac24-Oct-02 10:50
valikac24-Oct-02 10:50 
GeneralRe: CList and sockaddr_in Pin
Rickard Andersson2024-Oct-02 11:27
Rickard Andersson2024-Oct-02 11:27 
GeneralCombo box + spin control Pin
User 988524-Oct-02 8:15
User 988524-Oct-02 8:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.