Using libcouchbase in async mode
I'm evaluating libcouchbase with Couchbase Server 2.0 DEV4 and have a question regarding use
of the library in async mode. All of the examples I've seen in the docs and on the web (and
there are not that many) make use of libcouchbase_wait(handle); in a pseudo-synchronous manner
to know when the queued operations have completed, in addition to any and all registered callbacks.
Ok, cool...I understand that. However, my applications are all written using libev and are
async, using the event loop to keep the application alive while they wait for events to process.
In other words, a daemon.
To quote the product page:
"More advanced programs will want to either call the libcouchbase_wait() function after generating some
operations, or drive the event loop themselves."
I'm willing to switch my code from libev to libevent (I've used both and prefer libev, but ok...I'll switch)
however can someone explain (which I don't see anywhere) how I get access to the event handle after
libevent has been initialized by libcouchbase and the event loop started (or is it not started until the first
action called into libcouchbase)?
I can't block....and unless I can get access to the handle, I think I'm stuck.
A small example would be stellar!! :>
Thanks in advance....