JuliaGeometry / JuliaGeometry/Triangulate.jl
Thread safety
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 42
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading triangle.c and the TriangulateIO definition in the Julia wrapper, focusing on how the unsuitable callback is passed through a global variable and how -u changes that path. Check whether the callback can be moved into TriangulateIO without major changes to triangle.c. Done means the callback path is safe for concurrent triangulate calls, with the -u case and existing lock advice clarified or tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, julia
- Domain
- api, computer-graphics
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100