Re: u8-ready? and char-ready?
Marc Feeley 04 Mar 2020 15:31 UTC
> On Mar 4, 2020, at 10:07 AM, Lassi Kortela <xxxxxx@lassi.io> wrote:
>
> The language should probably have one central (wait ...) procedure that waits for one or more things of assorted kinds. That facility could be extensible somehow to cover user-defined port or data types. It would be quite complex to specify, and a reliable specification might have to depend on environmental factors like OS threads vs green threads vs single-threaded, implementation of continuations, etc. Marc has a ton of pertinent experience, whereas I shouldn't be allowed to touch a spec on the topic :)
If “wait” is the fundamental primitive for waiting it is a bad idea because sooner or later you will have to implement a custom thread system on top of it to funnel all the various “waiting operations” of your program to the “wait” procedure.
A better design is for the Scheme implementation’s thread system to be in charge of the funneling (because it is the thing that knows about all the threads and their requests for waiting).
Marc