Re: Question about multithreads



On 10/31/06, John Cupitt <jcupitt gmail com> wrote:
If the value doesn't change, or you don't mind if changes are not seen
by other threads for a while, then it's OK to skip the mutex.

I forgot to say:

http://developer.gnome.org/doc/API/2.0/glib/glib-Atomic-Operations.html

Can save you an expensive mutex. But you need to use them very carefully.

John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]