Sending new code to the interpreter should be done in a background thread so that the text editor remains more responsive.
Have a queue and enqueue code updates. A separate thread dequeues and sends to the interpreter.
Optimization: the queue is fake, actually only max one element is in the queue: the last update that was sent. All intermediate updates will be superseded by the last update, so we can trash them.
Sending new code to the interpreter should be done in a background thread so that the text editor remains more responsive.
Have a queue and enqueue code updates. A separate thread dequeues and sends to the interpreter.
Optimization: the queue is fake, actually only max one element is in the queue: the last update that was sent. All intermediate updates will be superseded by the last update, so we can trash them.