On 11/23/09, Andrew Francis <[email protected]> wrote: > > Hi Larry: > > >Select (on inputs) requires single-receiver channels. Multiple senders are > >OK. Given that restriction, a select can be implemented without race > >conditions. > > Okay I think I get what you are saying. If you are doing a receive(), > having multiple senders is okay. And if you are doing a send(), having > multiple receivers are okay. However if you are doing a receive, and there > is another receiver beats you to the punch, that is a problem. With a little > change to the select() interface, this could be detected and an exception > could be raised.
Even better, you could have mutually exclusive species "channel-with-multiple-receivers" and "channel-with-select". An attempt to initialize a select would fail if the channel has more than 1 receiver. An attempt to add another receiver would fail if the channel has a select underway. Better yet (in my personal opinion), the two kinds of channels would be distinguished at declaration. Larry Cheers, > Andrew > > > >
_______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
