简体   繁体   中英

What's the replacement for Java NIO in .NET 4.5?

As I studied NIO, one of its important features is its non-blocking behavior. Is it true that in .NET and C# the combinations of Async/Await and Streams brings that non-blocking feature of NIO into .NET?

Or is there any other good replacement in .NET 4.5?

I found Any NIO frameworks for .NET? question on SO but it's a 2009 question which there wasn't any Async/Await introduced yet.

Apart from async/await , the other framework (well more of a extension) is the Rx Extensions (Reactive Extensions)

Few Helpful links

Rx extension has little learning curve, but it can really ease up few works

As described on the website

The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators. Using Rx, developers represent asynchronous data streams with Observables, query asynchronous data streams using LINQ operators, and parameterize the concurrency in the asynchronous data streams using Schedulers. Simply put, Rx = Observables + LINQ + Schedulers.

Whether you are authoring a traditional desktop or web-based application, you have to deal with asynchronous and event-based programming from time to time. Desktop applications have I/O operations and computationally expensive tasks that might take a long time to complete and potentially block other active threads. Furthermore, handling exceptions, cancellation, and synchronization is difficult and error-prone.

最佳和最接近的匹配是: https : //github.com/Aaronontheweb/helios ,它是Java Netty框架的等效端口。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM