Thread Safety
RHT replicas are inherently thread-safe and no thread synchronization
is necessary to legally call the Dictionary
Operation functions on a replica.
rht_lib_init must be successfully called by a single thread
before any other RHT functions are called. Upon initialization,
RHT library will spawn a thread to monitor network communication.
Therefore the RHT library must be linked into a program that supports
threading.
rht_strerror is inherently thread safe.
Locks on the replica are automatically grabbed and dropped upon
entry and exit as necessary.
rht_pair, rht_snap and rht_nset are
read only structures, so only the reclamation of these structures
must be synchronized with operations and must be done only once
per structure instantiation. (you don't need to reclaim a rht_nset;
see on_synch_diff_cb).
A properly initialized rht_it references an underlying
constant rht_pair. Otherwise, access to the iterator itself is
not synchronized. |