Re: Green threads or OS threads?
Marc Nieper-WiÃkirchen 14 Apr 2022 05:53 UTC
SRFI 226 leaves that open to the implementation as well. What could be
added to the language is that every Scheme thread that is not blocked
("runnable" in the SRFI 18 terminology) will eventually be woken up.
That's a minimal fairness guarantee.
It is up to the implementation that long-running calls to the OS don't
block other Scheme threads running in the same OS thread. If a minimal
FFI becomes part of the spec of the large language, it will have to
pay attention to this. FFI calls will have to be short-lived (or the
implementation must launch them in a dedicated OS thread).
Am Do., 14. Apr. 2022 um 04:56 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>
> SRFI 18 is written in such a way that its threads can either be internal to the OS process ("green threads") or are directly supported by the OS ("Posix/Windows threads"), or a set of green threads running on a (typically smaller) set of OS threads ("M:N threads"). Is the same true of SRFI 226 threads as currently understood?