[<<][sm][>>][..]
Sat Jan 11 20:41:03 CET 2020

Select

Going over csp.c

If a hot task is a select.  It will need to scan the compatible
channels until something is found.

EDIT: Implementing select, it is clear that it's not possible to use
the channel array trick because a task can appear in more than one
queue, and I don't want to start messing with containers.  Use a
traversal instead.

It will be slightly different:

while hot tasks:
  for all cold tasks:
     rendez-vous?
     yes ->
       remove from both queues
       copy data
       resume
       requeue hot

This requires minor changes to the loop function.

An extension of is_rendez-vous, as it needs to check if a sender's
channel is part of a select's channel.

But the thing I don't really want to do now is to implement the queue
remove.


Note that the prime objective is simplicity.  Speed is nice but not
essential.

EDIT: It's also clear now that making the choice between send and
receive early leads to simpler code when matching.



  


[Reply][About]
[<<][sm][>>][..]