Asynchronicity in D
Max Klyga
max.klyga at gmail.com
Thu Mar 31 14:07:04 PDT 2011
On 2011-03-31 19:26:45 +0300, Andrei Alexandrescu said:
> On 3/31/11 6:35 AM, Max Klyga wrote:
>> snip
>
> I think that would be a good contribution that would complement Jonas'.
> You'll need to discuss cooperation with him and at best Jonas would
> agree to become a mentor.
Jonas agreed to become a mentor if I make this proposal
strong/interesting enough.
>
> I've posted a couple of weeks earlier how I think that could work with
> ranges: the range maintains the asynchronous state and has a queue of
> already-available buffers received. The network traffic occurs in a
> different thread; the range throws requests over the fence to libcurl
> and libcurl throws buffers over the fence back to the range. The range
> offers a seemingly synchronous interface:
>
> foreach (line; byLineAsync("http://d-programming-language.org"))
> {
> ... use line ...
> }
>
> except that the processing and the fetching of data occur in distinct threads.
I thought about the same.
>
> Server-side code such as network servers etc. would also be an
> interesting topic. Let me know if you're versed in the likes of
> libev(ent).
I have no experience with libev/libevent, but I see no problem working
with either, after reading some exapmles or/and documentation.
More information about the Digitalmars-d
mailing list