ec_queue_async_job

March 26, 2020 Contributors

Name

ec_queue_async_job — Enqueue an asynchronous job

Synopsis

#include "ec_thread_pool.h"

| int **ec_queue_async_job** ( | job); |   |

ec_async_job * <var class="pdparam">job</var>;

Description

Enqueue an asynchronous job.

Note

The ec_queue_async_job function (without a terminating underscore) invokes ec_queue_async_job_ and is defined in the following way: #define ec_queue_async_job(job) ec_queue_async_job_(job, __FILE__, __LINE__, 0). Invoking ec_queue_async_job_ directly is not usually required.

Parameters

job

The job you wish to enqueue. For a definition of this data type see ec_async_job.

Return Values

On success this function returns 1; on failure, 0.

Threading

It is legal to call this function in any thread.

See Also

The Threadpool API