AsyncClosure


Object Hierarchy:

Object hierarchy for AsyncClosure

Description:

[ CCode ( has_type_id = false ) ]
[ Compact ]
[ Version ( since = "3.12" ) ]
public class AsyncClosure

Run asynchronous functions synchronously.

AsyncClosure provides a simple way to run an asynchronous function synchronously without blocking the current thread.

1) Create a AsyncClosure with camel_async_closure_new.

2) Call the asynchronous function passing camel_async_closure_callback as the TaskReadyCallback argument and the AsyncClosure as the data argument.

3) Call camel_async_closure_wait and collect the AsyncResult .

4) Call the corresponding asynchronous "finish" function, passing the AsyncResult returned by camel_async_closure_wait.

5) If needed, repeat steps 2-4 for additional asynchronous functions using the same AsyncClosure.

6) Finally, free the AsyncClosure with camel_async_closure_free.


Namespace: Camel
Package: camel-1.2