[GiNaC-list] How (not) thread-safe is ginac?

Thomas Bächler thomas.baechler at gmx.de
Sat Nov 22 14:34:35 CET 2008


I am planning to use ginac for mathematic implementations which can (and
should) be parallelized. However, I found hints that ginac is not
thread-safe. The only thing in the source code was here:
http://www.ginac.de/ginac.git?p=ginac.git;a=blob;f=ginac/ptr.h

If I understand this right, the reference counting should be protected
by mutexes and one would have to think of a way to avoid certain race
conditions with makewritable(). What else is there in ginac that would
need to be changed for thread-safety?

Note that I do not plan to share any objects but only the symbols I use
between threads, so I probably could (temporarily) work with a version
that is only partially thread-safe.

Thanks for your replies
Thomas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://www.cebix.net/pipermail/ginac-list/attachments/20081122/2aa38476/attachment.sig 


More information about the GiNaC-list mailing list