Re: ghashes



Christoffer Gurell <orbit supa nu> writes:

> are the hashes really thread safe??.. there are NO locks in the structs
> anywhere .. this means that they are safe aslong as 2 threads dont use the
> same hash..

Yes. Applications that need more can add their own locks. This is the 
general thread-safety policy of GLib - using two separate data structures
from two different threads is safe, using one data structure from
two threads is not.

(The overhead of locking at data-structure level granularity always was
considered prohibitive)

                                        Owen




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