Triangulate.jl icon indicating copy to clipboard operation
Triangulate.jl copied to clipboard

Thread safety

Open j-fu opened this issue 1 year ago • 0 comments

When using the unsuitable callback, the unsuitable method is passed to C through a global variable. Therefore at least in this case, the code is not thread-safe. It should be thread-safe (not tested though) if -u is not used.

For making the code thread-safe, the unsuitable callback should be made part of TriangulateIO in the C library after checking if this is possible withot mayor modification of triangle.c .

Meanwhile the advise is to put a lock around triangulate calls in multithreaded code.

j-fu avatar Nov 04 '22 09:11 j-fu