[dmd-concurrency] synchronized, shared, and regular methods inside the same class
Graham St Jack
graham.stjack at internode.on.net
Mon Jan 4 16:23:46 PST 2010
Walter Bright wrote:
> I figure that the main way to do multithreaded programming in D will
> be with the message passing library that Sean is building. A user
> using that should never see shared. Shared is for those cases that
> cannot be done with message passing.
That's great, and I agree completely.
However, we need the tools to be able to write libraries of our own
without any special back-door tricks. Therefore, we need a way to create
shared objects that provide safe touching-points between threads,
without seeing shared pop up everywhere.
>
> I think Go's channels are just message passing. The fundamental
> problem with it in Go is Go has no concept of immutability, so there's
> no way to guarantee safety.
Agreed - immutable is essential.
More information about the dmd-concurrency
mailing list