- A publish-subscribe approach promotes a highly decoupled approach to programming. This can be beneficial when you have many components (for example, sensors) publishing data that simply needs to be consumed elsewhere in your program.
- GIL stands for Global Interpreter Lock. It's a design aspect of the Python programming language that means only one thread ever has access to the Python interpreter at a time.
- A pure event loop (for example, one long while loop) can get complex as your program grows. The need for many state variables and non-trivial and intervening conditional tests (for example, if statements) can make the program logic hard to follow and debug.
- No. Every approach has its purpose. Event loops are fine when they are small and focused. It's only when they become large and are performing multiple actions that they become complex.
- When you are programming with threads, calling join() on another thread...