Implementing multithreading policy templates in D?

Sean Kelly sean at invisibleduck.org
Sun Jun 8 11:41:17 PDT 2008


== Quote from Brian Price (blprice61 at yahoo.com)'s article
> Lars Ivar Igesund Wrote:
> > Brian Price wrote:
> >
> > > Greetings,
> > >
> > > While implementing a design I ran into a need for multiple implementations
> > > with different threading policies.  It looked to me as if porting Loki's
> > > Threading Model policies over to D would be just the ticket.
> > > Unfortunately there's no mutex-like class in Phobos that I can find and
> > > Object's monitor is not exposed so no way to acquire/release on it other
> > > than through synchronized.
> << -- snip --- >>
> > > Having used about every 'mainstream' language over the past twenty odd
> > > years, I figure either I'm missing something huge and need to learn an
> > > entirely new approach or there's something missing from the standard
> > > library.  So I'm left with three questions:
> > >
> > > Did I miss something in the docs/std lib code?
> > >
> > > Is there a way to implement flexible threading policies using synchronized
> > > statements?
> > >
> > > What are the chances we'll see Object sporting wait/notify methods or
> > > lock/unlock methods in a future release?
> > >
> > > Thanks,
> > > Brian
> >
> > Tango should have most (if not all) the threading primitives you need - to
> > be frank, for any serious threading code, Phobos doesn't cut it.
> >
> > --
> > Lars Ivar Igesund
> > blog at http://larsivi.net
> > DSource, #d.tango & #D: larsivi
> > Dancing the Tango
> Thank you for your quick reply.  I've looked at Tango and it does seem to have an abundance, any idea
when it will be ported to D 2.x?

"Someday."  Doing so will take time, and I don't even have enough of that to
fix the bugs already on my plate.  That and, to be frank, supporting D 2.0
isn't a terribly high priority.  Perhaps if GDC had better 2.0 support.


Sean



More information about the Digitalmars-d mailing list