CTryCatch
CTryCatch copied to clipboard
Thread-safety tests
Can be done easily :
- lock a mutex whenever you use a global variable, unlock it when you are done
@Klevh I guess this needs some threading library... I wanted it to be plain C implementation.
You can also put all globals in a single C source file (not header), as static thread_local, and write basic functions to access them (it just works the same as encapsulation in C++, for example), so :
- Coupling is (a bit) reduced
- Each thread has its own exceptions