pyion is designed to allow for operation in a multi-threaded environment. Internally, it makes sure to release the Python Global Interpreter Lock (GIL) prior to performing any operations that involve the SDR, which contains its own lock. By doing so, we ensure that there is no chance of having deadlocks between the GIL and the SDR.
However, testing has shown that it is still possible to cause unsafe race conditions when using pyion in a multi-threaded environment, and that this is likely caused by the ION public interface not being thread-safe. Therefore, even though this problem is not really part of pyion, we document it here for simplicity.
Finally, most experienced problems have occurred when using multiple threads to send data via endpoints. When separate threads are used for transmit and receive, then no race conditions have been observed.
pyion is designed to allow for operation in a multi-threaded environment. Internally, it makes sure to release the Python Global Interpreter Lock (GIL) prior to performing any operations that involve the SDR, which contains its own lock. By doing so, we ensure that there is no chance of having deadlocks between the GIL and the SDR.
However, testing has shown that it is still possible to cause unsafe race conditions when using pyion in a multi-threaded environment, and that this is likely caused by the ION public interface not being thread-safe. Therefore, even though this problem is not really part of pyion, we document it here for simplicity.
Finally, most experienced problems have occurred when using multiple threads to send data via endpoints. When separate threads are used for transmit and receive, then no race conditions have been observed.