else if (locks_n_stuff[var]) lock=locks_n_stuff[var]->lock(); else lock=locks_n_stuff[var]=Thread.Mutex();
That could create a race condition couldn't it? When does thread switching potentially occur? Between each opcode?
/ David Hedbor
Previous text:
2003-02-05 15:13: Subject: synchronized
Anyone against adding that to Threads.pmod?
Is the above code thread-safe without adding extra locks?
/ Mirar