Does Q support multithreading?
Yes. As of Q 3.1, on systems where the POSIX threads library or some compatible replacement is available (this includes Windows and most modern UNIXes), the interpreter can be built with POSIX threads support, and is reentrant via the C interface, provided that you register threads which need access to the internals of the interpreter; see the libq header file for details. Moreover, the clib module provides a fairly complete set of bindings for the POSIX thread functions. With these facilities you can implement multithreaded scripts which concurrently evaluate expressions in different threads. Besides thread creation, termination and cancellation, the usual synchronization features (mutexes, conditions and semaphores) are all supported. Clib actually implements semaphores as semaphore queues, which makes it possible to send expression values from one thread to another.