void valvula_async_queue_lock ( ValvulaAsyncQueue queue)

Allows to lock the queue, making the caller the only thread owning the queue.

This function should be used in conjuntion with valvula_async_queue_unlocked_push. Call to valvula_async_queue_push will lock the caller forever until a call to valvula_async_queue_unlock is done.

Parameters
queueThe queue to lock.

NOTE: To produce portable code, the thread calling to this function must also call to valvula_async_queue_unlock. It is not supported by Microsoft Windows platforms to do a call to valvula_async_queue_unlock from a different thread that issue the call to valvula_async_queue_lock.

References valvula_mutex_lock().