Python in docker – RuntimeError: can’t start new thread

Solution to this problem was to upgrade docker from version 18.06.1-ce to 20.10.7. Why? This is because the default seccomp profile of Docker 20.10.9 is not adjusted to support the clone() syscall wrapper of glibc 2.34 adopted in Ubuntu 21.10 and Fedora 35. Source: ubuntu:21.10 and fedora:35 do not work on the latest Docker (20.10.9)

How do I run two python loops concurrently?

If you want concurrency, here’s a very simple example: from multiprocessing import Process def loop_a(): while 1: print(“a”) def loop_b(): while 1: print(“b”) if __name__ == ‘__main__’: Process(target=loop_a).start() Process(target=loop_b).start() This is just the most basic example I could think of. Be sure to read http://docs.python.org/library/multiprocessing.html to understand what’s happening. If you want to send data … Read more

What is the lifecycle and concurrency semantics of Rhino Script Engine

So I’ve run the experiment and the Rhino engine reports “Mozilla Rhino” is MULTITHREADED which the JavaDocs asserts “MULTITHREADED” – The engine implementation is internally thread-safe and scripts may execute concurrently although effects of script execution on one thread may be visible to scripts on other threads.” Here’s the code…it looks threadsafe to me, as … Read more