Comment on First C# 7 Design Meeting NotesparentComments−Cakez0r11yYou can already get a long way towards channels by using reactive extensions (E.G. http://pastebin.com/h1xteunX)Some syntactic sugar a la await could be nice though.−theflagbug11yNot sure if you're aware, but your Rx example has a few problems:1.) In the StartSenders method, you're violating the Rx grammar by calling channel.OnNext concurrently. Wrap it on a lock statement.2) In StartReceiver you're missing out messages the way you handle the channel. Replace the loop with a call to channel.Subscribe−Cakez0r11yI did not know either of those things! Thanks!
Comments
You can already get a long way towards channels by using reactive extensions (E.G. http://pastebin.com/h1xteunX)
Some syntactic sugar a la await could be nice though.
Not sure if you're aware, but your Rx example has a few problems:
1.) In the StartSenders method, you're violating the Rx grammar by calling channel.OnNext concurrently. Wrap it on a lock statement.
2) In StartReceiver you're missing out messages the way you handle the channel. Replace the loop with a call to channel.Subscribe
I did not know either of those things! Thanks!