Is the new D threading model emulating processes + shared memory?

Leandro Lucarella llucax at gmail.com
Fri Aug 1 07:44:53 PDT 2008


I was thinking about the thread "Sharing in D" and it came up to my mind
that what it's been done with this model is just emulating processes +
shared memory. If you program you application with processes instead of
threads and shared memory instead of "D shared" type (or global variables
in general), you get what D is trying to do: clearly separated memory
areas for shared and unshared data, and protection.

So, what are the advantages of using threads+shared in D 2.0 compared with
processes+shared memory in D 1.0? I guess it's just simpler to program,
and maybe, more familiar to "threads programmers" (people that are not
very used to program using processes). Well, I guess you can have a little
faste context switches too, but I don't think this his a huge gain in
modern operating systems.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
Yo soy Peperino él que nunca toma vino, yo soy aquel que por la mañana
escucha Salatino.
	-- Peperino Pómoro



More information about the Digitalmars-d mailing list