← Back to team overview

drizzle-discuss team mailing list archive

Re: libdrizzle: integration with another event loop

 

Evan Jones wrote:
This is perfect, although I don't get what I'm supposed to do to *act* on the callback. For example, what if writing the query blocks, how do I resume the write? Looking at examples/client.c, it appears to keep calling drizzle_query() until it returns DRIZZLE_RETURN_OK? This doesn't seem right to me when I follow the code. It seems like this will cause the query to be issued multiple times?

I apologize for all the emails. I finally figured it out. The answer is: yes, call the drizzle API function that returned IOWAIT until it returns OK.

I'm working on an example that can be included with libdrizzle. This will definitely integrate fairly cleanly with my application. I just need to write a wrapper to make libdrizzle's API work with my application's callback mechanism, which will be a little bit of work, but won't be too painful.

Still: definitely less work than wrapping libmysqlclient. Thanks,

Evan

--
Evan Jones
http://evanjones.ca/



Follow ups

References