Hacker News new | ask | show | jobs
by bkirkbri 4732 days ago
Using core.match with core.async does sound promising! Am I correct that Erlang-style selective receive would NOT be possible?

I don't see this as much of a downside though, considering the issues one can have with selective receives.

1 comments

Yes I'm pretty sure selective receive is not supported.
You can mimic selective receive using a router process. Essentially, you could generate one channel for every branch of the pattern match, then generate a process which reads from the input channel and deals the message to the appropriate branching channel.