View Single Post
  #17 (permalink)  
Old March 5th, 2002
Moak's Avatar
Moak Moak is offline
Guest
 
Join Date: September 7th, 2001
Location: Europe
Posts: 816
Moak is flying high
Default CriticalSection/Mutex

Hi again Swabby,
what I wonder... you use a mutex (e.g. CCriticalSection CGnuControl::m_NodeAccess) only on write access to your socket lists (adding/removing nodes), but not also on read access (broadcasting packets). I don't think that std::vector<> is thread safe. I did cross check with Mutella, and Max does use a Mutex on read and write access - which is what i do usually too.

I would expect unexpectable behaviours in Gnucleus - or did I overprotect my code?

Greets, Moak
Reply With Quote