4 ms·
This is horrifying. Thanks for the nightmare fuel. > while the tcl was running nothing else was being done, so you could rearrange memory and it was cool as lo
by xyzzy_plugh 4y ago
This is horrifying. Thanks for the nightmare fuel.
> while the tcl was running nothing else was being done, so you could rearrange memory and it was cool as long as you finished before the end of the command
My mind immediately springs to all the ways this can go horrifically wrong.
- hnov 4y agoThis is how most high performance networked software is written, it’s mostly fine, when you’re running on the event loop, nothing else is.
- dkfellows 4y agoTcl uses a memory model internally where each piece of memory belongs strictly to the thread that allocated it, with this enforced in lots of places. There are a few loopholes past it (for process-wide concepts such as the current working directory cache, or for inter-thread messaging) but by and large you write what appears to be single-threaded code. There's support for deep coroutines and non-blocking I/O so it isn't limiting. You only really need multiple threads when dealing with compute-heavy code or a particularly crufty API.