I've moved a little bit forward with Windows thread support in SBCL. Now I can the thread to start, and even the garbage collection may run when multiple threads are running. That's not entirely true since stopping of threads is not fully implemented. For example, gc_stop_the_world
would if fail if the thread was in a pseudo-atomic section but it should be easy to fix. At least I got simple examples to work.
But now I got to the point that I'm not so sure whether it's right to stop the thread by pushing a new frame into its call stack. While the thread is being hijacked by a new call stack frame, it might be holding some important system resources (that are not designed with such a case in mind) that might be necessary for the garbage collector to run.
If this is the case then I would have to come up with other ways of stopping the threads. For example, it's possible to avoid stopping the thread if the Lisp-side of its stack and the Lisp heap will be untouched by that thread. But I'll leave that option for a later time in case the simpler ways of stopping will not work somehow.