Re: Idiomatic async programming like C# async/await

2014-09-14 Thread Kagamin via Digitalmars-d-learn
On Friday, 12 September 2014 at 03:59:58 UTC, Cliff wrote: ...but std.parallelism.Task requires parameterization on the function which the task would execute - that is clearly an implementation detail of the store. I think, you can wrap the Task in a class. abstract class CTask { abstract

Re: Idiomatic async programming like C# async/await

2014-09-14 Thread Cliff via Digitalmars-d-learn
On Sunday, 14 September 2014 at 09:19:11 UTC, Kagamin wrote: On Friday, 12 September 2014 at 03:59:58 UTC, Cliff wrote: ...but std.parallelism.Task requires parameterization on the function which the task would execute - that is clearly an implementation detail of the store. I think, you can

Re: Idiomatic async programming like C# async/await

2014-09-13 Thread Kagamin via Digitalmars-d-learn
No, vibe provides synchronous non-blocking interface similar to async/await.

Re: Idiomatic async programming like C# async/await

2014-09-12 Thread Kagamin via Digitalmars-d-learn
async/await is not so much about futures/promises, but optimization of IO-bound operations, i.e. when you wait on network/disk, you don't consume stack, threads and similar resources, an analog in D is vibe.d

Re: Idiomatic async programming like C# async/await

2014-09-12 Thread Cliff via Digitalmars-d-learn
On Friday, 12 September 2014 at 07:15:33 UTC, Kagamin wrote: async/await is not so much about futures/promises, but optimization of IO-bound operations, i.e. when you wait on network/disk, you don't consume stack, threads and similar resources, an analog in D is vibe.d I should have been

Idiomatic async programming like C# async/await

2014-09-11 Thread Cliff via Digitalmars-d-learn
(New to D, old hand at software engineering...) I come from .NET and have made heavy use of the async/await programming paradigm there. In particular, the Task mechanism (futures/promises) lets one encapsulate the future result of some work and pass that around. D seems to have something