Re:Microsoft takes .NET open source and cross-platform
by Rapzid on Thursday November 13, 2014 @01:45AM
(#8600252)
Tasks are pretty awesome and just about as convenient as Go-routines. Now if we could just get typed channels in .Net >:]
[ Parent
| on HN ]
Re:Microsoft takes .NET open source and cross-platform
by Matthias247 on Thursday November 13, 2014 @07:43AM
(#8601212)
How about BlockingCollection<T>?
If I understand it correctly you can even have select like sementics with BlockingCollection.TakeFromAny(...)
Edit: Sorry, messed it up a little bit. BlockingCollection will block your current thread for any other computation and does not allow to await on it.
But there seem to be alternatives: http://stackoverflow.com/questions/21225361/is-there-anythin... http://blog.stephencleary.com/2012/12/async-producer-consume...
Re:Microsoft takes .NET open source and cross-platform
by tracker1 on Thursday November 13, 2014 @03:08AM
(#8600442)
I don't think it would be very hard at all to create a generic CSP system with C# (or F# for that matter). I've built similar systems using WCF.
Re:Microsoft takes .NET open source and cross-platform
by Paradigma11 on Thursday November 13, 2014 @07:23AM
(#8601144)
Doesn't rx fill that role?
Re:Microsoft takes .NET open source and cross-platform
by Matthias247 on Thursday November 13, 2014 @07:57AM
(#8601262)
With Rx you can do similar things but the semantics are different. When you use an Rx Stream you will get the data pushed from a different thread. With Go-like channels you pull the data from the other thread (or the channel).