next up previous contents index
Next: Programming with threads Up: Threads Previous: Local and global variables   Contents   Index


Mutexes

The internal functions of the command interpreter that deal with threads, objects, string variables, numeric variables (of the expression evaluator), question files, conditions and files are protected by mutexes. This means for instance that a function (or two functions) using objects cannot be run simultaneously by two threads. This is done for instance to prevent a thread from destructing or creating an object while another one is reading the list of objects. I hope that I have put enough mutexes to avoid such situations. To avoid inconsistencies, the commands load and delprog used to load and delete programs can be used only in the main thread.



2009-11-12