I’ve been working a lot with the ruby gc lately, as part of an exception translating c+±>ruby->c++ communication layer to be used in a hi-spec PC game, and I’ve realised:
*the thing that really stops ruby from working with native threads is
the different stack that each thread gets.
*perhaps it would be possible to split the gc tasks into separate
threads, while keeping all ruby interpretation happening in one
For example having the mark and sweep phases each running in their own thread, but each thread only having to work with VALUES that have been created from the interpreter thread. The gc threads become consumers of the interpreter producer.