On Thu, 23 Apr 2015 13:22:46 GMT, Márcio Martins wrote:

Are you waiting for all the threads to finish? You mention you run 5 queries, but I only see you waiting for one.

Yeah, I'm waiting for all of them to finish.

but I guess it's fairly unlikely.

That it is thread safe?

Also, I think it's generally a bad idea to mix std.parallelism with vibe.d. Vibe's has it's own versions of most of std.parallelism, which will not block the event loop thread on contention, and will generally do the right thing.

That's probably my issue.

The major difference is that for example in your case, when you call yieldForce(), vibe.d cannot just go and do something else, like handle another request. The OS will just switch away from your event loop thread altogether. This is very inefficient and goes against vibe'd async model.

I was having issues getting async to work. I'll try it again.