AsyncWorker

About

AsyncWorker is a little library written by PhilipVanHoof. The library makes it easier to provide a queue that automatically creates a worker thread that processes tasks that you assign to it. It processes them synchronously in that thread (one by one).

Technical about

`OAsyncWorker`

The OAsyncWorker is the queue itself. It launches a thread if it has work to do. For each tasks that it got assigned to process it first launches the task's body function and then the task's callback in the GMainLoop.

`OAsyncWorkerTask`

The OAsyncWorkerTask is one task that is usually assigned to a OAsyncWorker worker queue. It has a body function and a callback. The body function's code is executed in the queue's thread. The callback is executed in the GMainLoop.

Documentation

Availability

Releases

  • There are no official releases yet

Code

Building

From Subversion repository:

svn co http://svn.gnome.org/svn/asyncworker/trunk asyncworker
cd asyncworker
./autogen.sh --prefix=/opt/asyncworker
make && sudo make install

Using

For example with the sample at DBusGlibBindings:

cd ..
tar zxvf program-asyncw.tar.gz
cd program-asyncw
export PKG_CONFIG_PATH=/opt/asyncworker/lib/pkgconfig
./autogen.sh --prefix=/opt/program-asyncw
make && sudo make install

Attic/AsyncWorker (last edited 2014-08-06 22:50:47 by SvitozarCherepii)