Peter Kümmel wrote: > When a thread enters a function which another thread is busy on it hangs > in the lock, if it wouldn't wait the the chaos would become even worse. > The mutex only guaranties that one operation is finished before the next > starts.
yep, i know whot is mutex for. my question was about the graph scenario problems. >> disseminating mutexes all over the place smells like asking for deadlock, >> hope you know how the graph code is entangled... > > Yes, it is a risk, but we must make our code more thread safe if we don't > wanna have crashes "here and there". sure, the problem is how to do that. is two threads need create graph path the we need two graph data structures for each thread and not thread safe graph. these mutexes will not prevent code failure, though it may not crash. do you plan to attack another classes ? pavel