int vortex_hash_lock_until_changed ( VortexHash hash_table,
long  wait_microseconds 

Allows the callers to get locked until a change is detected on the hash table (insert, update or remove operation) found or the wait period is reached (wait_microseconds).

During the lock operation the hash table remains usable to other callers (including threads).

hash_tableThe hash table to wait for changes.
wait_microsecondsThe amount of time to wait. If 0 is used, it will wait without limit until next change is produced.
The function returns -2 in the case wrong parameters are received (NULL hash table reference or negative value for wait_microseconds). The function returns 0 in the case the wait_microseconds period is reached without any change. 1 is returned in the case a change is detected during the wait_microseconds. Once the function returns, the change has already taken place.

References vortex_async_queue_new(), vortex_async_queue_pop(), vortex_async_queue_timedpop(), vortex_hash_unref(), vortex_mutex_lock(), and vortex_mutex_unlock().