On Sun, 14 Feb 2016 12:48:49 +0100, Jacob Carlborg wrote:

> On 2016-02-14 00:32, Dicebot wrote:
> 
>> Ideally ddb should be built on top of ddbc wrapping it into
>> fiber-friendly async API but I don't know if this is possible with ddbc
>> design.
> 
> It looks like libpg has support for asynchronous calls [1] but ddbc does
> not use them. Also, although libpg provides asynchronous calls I'm not
> sure if that automatically means it will be compatible with the IO model
> used by vibe.

If you have asynchronous calls that you can poll, you can make it work 
with vibe.d, albeit awkwardly. (Start request, poll+yield, return when 
there's a result.) If you only have synchronous calls, you'd have to 
introduce IO threads and synchronization.

It's awkward to make things compatible with vibe.d and Phobos IO. The APIs 
are rather dissimilar, so you can't just, for instance, have different 
imports under a version() block.

Reply via email to