On Sat, 18 Mar 2017 22:50:11 GMT, Carl Sturtivant wrote:

On Sat, 18 Mar 2017 09:38:39 GMT, Carl Sturtivant wrote:

In code that doesn't call getResult, a call to async to run a very long task is not returning, but rather is running the call as if it is a regular (synchronous) function call, and only returns a future when the call is done.

I've made the simple and intuitive discovery that a call of sleep(100.msecs) at the start of the body of the function asynchronously called obviates the problem.

Unfortunately, that means I have likely misunderstood async --- the D Web Development book I read some time back when it came out, said it runs its argument(s) in a separate thread, but this looks to be false, i.e. it's cooperative multitasking. Please confirm.