On Sun, 09 Feb 2014 19:27:26 GMT, Etienne wrote:

you could run the operations in openCV through a new task and yield or such, you'd reduce latency to a minimum.

Scratch that, you would probably make best use of futures for this purpose, with worker tasks that start fibers in a separate thread pool that has its own event loop (not related to that which handles the web requests). My idea of futures would allow the web request fiber to receive / send partial answers by capturing ranges.

I think every part of this would need to be built on top of vibe.d currently. https://github.com/rejectedsoftware/vibe.d/issues/490

Otherwise the only way you wouldn't block the thread that handles web requests is by yielding periodically during the thread collision algorithm. In any case, there's lots of flexibility.