Keywords: onyx

Next: 4.4 Threads Up: 4. The libonyx library Previous: 4.2 Global variables Contents Index

# 4.3 Multiple interpreters

libonyx supports running multiple interpreters (encapsulated by the nx class) in the same process, though as already mentioned, it usually makes more sense to use threads. The values associated with argv and envdict are shared among all interpreters, but otherwise, no state is shared between interpreters by default. However, since all interpreters share a single garbage collector, C code can create references to the same Onyx object in more than one interpreter, and no problems will result (normal object synchronization issues not withstanding).