mehrandvd
mehrandvd

Reputation: 9116

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.

Upvotes: 2

Views: 2902

Answers (2)

Okyere Adu-Gyamfi
Okyere Adu-Gyamfi

Reputation: 21

The best and closest match is :https://github.com/Aaronontheweb/helios, it is an equivalent port of the Netty framework for java.

Upvotes: 0

Parimal Raj
Parimal Raj

Reputation: 20575

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.

Upvotes: 1

Related Questions