VortexAsyncQueue * vortex_async_queue_new ( void  )

Creates a new async message queue, a inter thread communication that allows to communicate and synchronize data between threads inside the same process.

Once created, you can use the following function to push and retrieve data from the queue:

You can increase the reference counting by using vortex_async_queue_ref. If the reference count reaches zero value, the queue is deallocated.

A particular useful function is vortex_async_queue_length which returns the number of queue items minus waiting threads.

A newly created async queue, with a reference count equal to 1. To dealloc it when no longer needed, use vortex_async_queue_unref. Note reference returned must be checked to be not NULL (caused by memory allocation error).

References VORTEX_CHECK_REF, VORTEX_CHECK_REF2, vortex_cond_create(), and vortex_mutex_create().

Referenced by vortex_channel_create_wait_reply(), vortex_hash_lock_until_changed(), vortex_listener_wait(), vortex_pull_init(), vortex_sasl_start_auth_sync(), vortex_thread_pool_init(), vortex_tls_start_negotiation_sync(), vortex_xml_rpc_boot_channel_sync(), and vortex_xml_rpc_invoke_sync().