rust-math / fftw

FFTW3 binding for Rust
Other
57 stars 25 forks source link

Thread safety #72

Closed benjamin-lieser closed 4 years ago

benjamin-lieser commented 4 years ago

In the documentation of FFTW3 it is stated that the creation of a plan is not thread save. http://www.fftw.org/fftw3_doc/Thread-safety.html Is this binding thread save? I cant find any mechanism which would prevent two threads to create 2 Plans at the same time.

termoshtt commented 4 years ago

There exists a global lock FFTW_MUTEX at https://github.com/rust-math/fftw/blob/master/fftw/src/lib.rs#L55, and excall! gets this lock for all raw FFTW API except for fftw_execute.

termoshtt commented 4 years ago

Please reopen if not resolved