dysfun@treehouse.systems ("gaytabase") wrote:
okay so threads have a message queue. scheduling a gin thread means sending the tonic (os) thread a message. we might even just pass you a pointer to the message cell, you could reuse it etc.
gins get resumed when they receive a message (and the tonic gets around to resuming them). however, now you're going to want selective receive. so gins have to have a queue because we need to buffer the other messages somewhere and we don't actually have a queue, we just piggyback on the tonic's.
so we sort of do have a queue, except that it's only used for buffering stuff when you're using selective receive.
all clear as mud? good good.