From: <don...@is...> - 2020-08-22 01:01:32
|
Is there some existing implementation of thread pools for clisp? Would it be much faster to use an existing thread from a pool than to create a new one? Should I write my own? It's not clear to me from impnotes what happens to a thread that finishes. I guess if it's GC-able then it gets GC'd, but if not, I hope it incurs no cost other than its own storage? And when it is finished can I get it to do something else by calling thread-interrupt on it? Or does this only work with non-terminated threads? And is a thread that finishes its function automatically "terminated"? Perhaps threads to be used in a pool should always be doing something, like (loop (sleep 1e6))? And then I can get them to do something else with thread-interrupt, right? After which they return to what they were doing when interrupted, right? So they can be interrupted to do something else, right? Is this all supposed to be obvious, or should impnotes say something about it? |