Conversation
|
Guile uses pthreads: And implements SRFI-18, plus some extra procedures: |
|
Bigloo supports SRFI-18 |
|
Co-operative multitasking is used in coroutines. Schemes with virtual threads usually implement some form of preemptive multitasking. |
|
Gauche uses Windows threads on MinGW version as well. |
|
Thanks a lot for the feedback! Added Guile and Bigloo.
Confusing wording on my part: the OS threads cooperate to preempt the virtual threads. However, at least Bigloo's Fair Threads require co-operation to be implemented by user code, so it's doubly cooperative.
Also confusing wording. "Multiple interpreters per OS process" would be clearer. Basically, the whole interpreter state is contained in a C struct, allowing the C programmer to create a separate interpreter for each C thread if he so chooses. So the interpreter doesn't need any provisions for multi-threading, but also doesn't get in the way of the C programmer's multi-threading. An interpreter that keeps state in global variables is not re-entrant in this way. TinyScheme and s7 ought to be re-entrant, and Guile is probably close enough. Can one process host multiple independent embedded Gauche's? |
|
Hey, nice initiative! Maybe I'm misunderstanding something, but what is a "virtual machine" thread? In the case of implementations that don't have a "virtual machine" (a la JVM and BEAM), is that the "main thread" of the program? The table seems to me to suggest that CHICKEN supports OS threads with the SRFI-18 API, but that's not the case (at least not OOB). The threads provided by the SRFI-18 egg are green threads (please forgive and correct me if this is not the correct/exact terminology). I believe there's an egg that makes it easier to use pthreads, however. So, shouldn't CHICKEN have "No" in "OS threads"? |
Ah, I see. Then Gauche is "no", for some global environments are shared process-wide. |
13fd344 to
321272e
Compare
321272e to
7e3ad31
Compare
https://doc.scheme.org/surveys/threads/