Gary Willoughby: "Why Go's design is a disservice to intelligent programmers"

Sönke Ludwig via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Mar 27 12:33:34 PDT 2015


Am 27.03.2015 um 19:56 schrieb Walter Bright:
> On 3/27/2015 5:15 AM, Sönke Ludwig wrote:
>> It has, that is more or less the original selling point. It also keeps an
>> internal thread pool where each thread has a dynamic set of reusable
>> fibers to
>> execute tasks. Each fiber is bound to a certain thread, though, and
>> they have
>> to, because otherwise things like thread local storage or other thread
>> specific
>> code (e.g. the classic OpenGL model, certain COM modes etc.) would break.
>
> It's awesome that vibe has that! How about replacing the fiber support
> in druntime with that?

It's actually based on the fiber support in Druntime. It would 
definitely be great to get the event loop and the scheduler into 
Druntime/Phobos, too. But it needs to be integrated in many places at 
the same time (core.sync.*, std.concurrency, std.stdio, std.socket etc.) 
to avoid bad surprises for users. We'd need to decide how to cut that 
work into manageable pieces.

Fortunately there is now already an event loop abstraction written in 
pure D [1], which should be integrated first, because the fiber 
scheduler itself isn't worth much without an event loop.

[1]: https://github.com/etcimon/libasync


More information about the Digitalmars-d-announce mailing list