GC deadlocks on linux
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Feb 19 09:01:44 PST 2015
On Thu, 19 Feb 2015 16:33:58 +0000, Byron Heads wrote:
> Now I am not sure. This code runs correctly:
as i told you before, `fork()` is hard. you can experiment for monthes
seeing strange bugs here and there, and seeing no bugs, and strange bugs,
and...
there are alot of things going on under the hood, and alot of things
aren't. strictly speaking you *CAN'T* get cloned process in the same
state as it's parent. it may work, though, if stars are in a good shape.
i can give you a simple test that will tell you if you should avoid `fork
()` in your code: unless you can explain what is going on in kernel,
glibc, pthreads and druntime exactly in the moment of forking, without
looking to mans, documentation and source code of all components -- avoid
using `fork()`. i can explain ~2/3, so i'm not using `fork()` in my
code. ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150219/0634790e/attachment.sig>
More information about the Digitalmars-d-learn
mailing list