4 ms·
With consistent, reasonable-by-default threading abstractions baked in
by menacingly 3y ago
With consistent, reasonable-by-default threading abstractions baked in
- bmitc 3y agoAre those new? What are they by name?
- leosanchez 3y agoI think the parent comment is talking about System.Threading.Tasks. I might be wrong though.
- bmitc 3y agoOh, I see. I was hoping for something new. I keep on hoping some sort of BEAM-like (from Erlang) process gets added to .NET.
- menacingly 3y agoI have considered the that, but I ultimately decided they work because they are a fabric of what that ecosystem _is_, not what it has. It's the same reason two sites that are more or less the same will have entirely different communities. There isn't any reason you couldn't implement the one on the other, but it's not in the core substance.
- valcron1000 3y agoIt was tried and the dotnet team decided to drop it: https://github.com/dotnet/runtimelab/issues/2398 https://github.com/dotnet/runtimelab/issues/2398
- custard42 3y agoinvestigations continue: https://github.com/dotnet/runtime/issues/94620 https://github.com/dotnet/runtime/issues/94620
- zengid 3y agoYou might be interested in Orleans: https://learn.microsoft.com/en-us/dotnet/orleans/overview https://learn.microsoft.com/en-us/dotnet/orleans/overview
- bmitc 3y agoOrleans is definitely interesting, but I have never looked into it much because it's my understanding that it is a cloud-only solution, in that it requires some Orleans or Azure service. Is that correct?
- jen20 3y agoNo, you can run in standard processes - there's even documentation [1] about hosting it in Kubernetes. [1]: https://learn.microsoft.com/en-us/dotnet/orleans/deployment/kubernetes https://learn.microsoft.com/en-us/dotnet/orleans/deployment/...
- Rapzid 3y agoFurther to the other reply you can run it alongside asp.net; one process can be an Orleans node and and an asp.net server.
- neonsunset 3y ago.NET has had first-class parallelism and async/await since around .NET Framework 4.0 release which was...13 years ago huh. There have been many improvements in the underlying runtime since then though. A garden variety of keywords is async/await, TPL (tasks/futures and structured concurrency) and PLINQ (Rust's Rayon).
- orra 3y agoYou're right the basic support's been around a long time. However, originally you always had to use Task methods. The pleasant async/await keywords didn't arrive until C# 5.0, in 2012. Admittedly that's also a long time ago.
- WorldMaker 3y agoIn addition to the base TPL (System.Threading.Tasks), IAsyncEnumerable<T> in recent .NET versions has deepened and simplified even more useful concurrency patterns (Async Generators), especially when paired with Ix.NET (System.Interactive.Async) which adds a lot more LINQ/PLINQ operators, many of which are designed to intentionally mirror ReactiveX.NET (System.Reactive), the even older but just as useful push-based (IObservable) relative of IAsyncObservable.