[ CCode ( cname = "g_thread_pool_push" ) ]
public void add (owned T data) throws ThreadError

Inserts data into the list of tasks to be executed by this.

When the number of currently running threads is lower than the maximal allowed number of threads, a new thread is started (or reused) with the properties given to ThreadPool.with_owned_data. Otherwise, data stays in the queue until a thread in this pool finishes its previous task and processes data.

throws can be null to ignore errors, or non-null to report errors. An error can only occur when a new thread couldn't be created. In that case data is simply appended to the queue of work to do.

Before version 2.32, this function did not return a success status.



a ThreadPool


a new task for this


true on success, false if an error occurred