Go to the first, previous, next, last section, table of contents.

Thread-safety

The library should be usable in thread-safe programs. All the functions should be thread-safe, in the sense that they shouldn't use static variables.

We don't require everything to be completely thread safe, but anything that isn't should be obvious. For example, some global variables are used to control the overall behavior of the library (range-checking on/off, function to call on fatal error, etc). Since these are accessed directly by the user it is obvious to the multi-threaded programmer that they shouldn't be modified by different threads.

There is no need to provide any explicit support for threads (e.g. locking mechanisms etc), just to avoid anything which would make it impossible for someone to call a GSL routine from a multithreaded program.


Go to the first, previous, next, last section, table of contents.