threading issues with D -> C -> Python

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Dec 2 17:17:33 PST 2014


On Wed, 03 Dec 2014 01:07:42 +0000
Michael via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:

> I'm fairly sure I have tackled both of these issues, but it still 
> seems like Python threads and D threads don't mix well. When 
> running the same functions from D, I am able to get no errors, 
> but when run from Python/C it causes segfaults reliably.
you are right, D threads and other language/library threads aren't mix
well. at least you have to use `thread_attachThis()` and
`thread_detachThis()` from core.threads module to make sure that GC is
aware of "alien" threads. and i assume that calling this functions
from python will not be very easy.

but it's better to not mix 'em at all if it is possible.
-------------- 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/20141203/f6db4582/attachment.sig>


More information about the Digitalmars-d-learn mailing list