Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix select with receive? and closed channels #8304
This PR implements https://gist.github.com/bcardiff/289953a80eb3a0512a2a2f8c8dfeb1db while fixing the behavior of
The main guidance where:
There was a need to extend the design of
For c : Channel(T), _, m1 = Channel.non_blocking_select(c.receive_select_action) _, m2 = Channel.select(c.receive_select_action) We will want to m1 : T | NotReady m2 : T So they need to be different methods and not just a change of behavior depending on the argument.
extend self is nice, but the typeof(M) == M:Module when module M; extend self, and it looks weird.