Revamped concurrency API
MIURA Masahiro
echochamber at gmail.com
Mon Oct 12 22:44:02 PDT 2009
Sean Kelly wrote:
> void sendmsg(T)( Pid pid, T val );
> final void recvmsg(T...)( Pid pid, T ops );
> Pid spawn(T)( T fun );
>
> spawn() is pretty limited so far in that it only spawns threads--I'd
> expect that function to end up with multiple overloads at some point.
Interesting. Future spawn() may spawn the thread in a remote CPU that
doesn't share the memory. In that case it perhaps helps to limit fun to
be pure, and val to be immutable, as in Erlang. D already has pure and
transitive const, so the first few steps for the massively-parallel
D programs are already completed! :-)
More information about the Digitalmars-d
mailing list