2 ms·
Although the procedural blocking style is definitely a lot easier, you don't need language support for coroutines to do that. They could have implemented this i
by mike_hearn 3y ago
Although the procedural blocking style is definitely a lot easier, you don't need language support for coroutines to do that. They could have implemented this in Java by just having two threads. One manages the robot and the other main thread blocks whilst waiting for commands to execute. The two threads swap messages using a linked blocking queue.