[dmd-concurrency] priority messages

Steve Schveighoffer schveiguy at yahoo.com
Mon Jan 25 10:10:41 PST 2010


----- Original Message ----

> From: Andrei Alexandrescu <andrei at erdani.com>
> 
> Steve Schveighoffer wrote:
> > 
> > 
> > 
> > ----- Original Message ----
> >> From: Michel Fortin 
> >>> 2. "Must handle" messages that unblock any call to receive(). They may or 
> may 
> >> not have priority. These may be derived from Exception.
> >> 
> >> I'd say those should be just "tasks". Sending one would execute that task in 
> the given thread, inside receive. Tasks could be shared delegates, functions, or 
> structs and objects defining opCall.
> > 
> > How does that scale to inter-process communication?  One thing that was nice 
> about the message passing is it was seamless as far as inter-process since the 
> messages could be serialized to be sent via IPC.  Executing arbitrary code can 
> only be feasible within the same process.
> 
> That is correct. There will be differences between send(tid, stuff) and 
> send(pid, stuff). There's stuff that you can only send across threads, such as 
> shared data and (now under discussion) pointers to functions.

OK, that makes sense (Michel's response too).  I was under the impression from early postings to this list that the differences between sending messages to threads and external processes would be abstracted.

Is there a planned hierarchy for Tid/Pid/etc. ?  Is it still going to be possible to abstract the commonalities?  I think this was an attractive proposition.

One library I've used for building easy-to-use network protocols is .NET remoting, which essentially allows you to call methods on remote objects as if they were local objects.  To myself, I thought it might be cool if we could build such a library on top of D's message passing scheme.

-Steve



      


More information about the dmd-concurrency mailing list