有没有C#反应堆/原子库? [英] Is there a C# reactor/proactor library?

查看:122
本文介绍了有没有C#反应堆/原子库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Windows C ++应用程序移动到C#,以便一些主要的增强功能更容易一些。 C ++应用程序是单线程的,并且使用本地生成的反应器模式来接收,读取和写入套接字和定时器的所有事件处理。所有套接字处理完成异步。

I'm looking to move a Windows C++ application to C# so that some major enhancements are a bit easier. The C++ application is single-threaded and uses a home-grown reactor pattern for all event handling of accepting, reading and writing sockets, and timers. All socket handling is done async.

实现C#反应堆模式的接受方式是什么?现有的图书馆?

What is the accepted way to implement a C# reactor pattern? Are the existing libraries?

推荐答案

阅读使用迭代器的C#中的异步编程;


在本文中,我们将看看如何编写执行异步操作的程序,而不需要典型的控制反转。简要介绍我的意思是异步和反转控制 - 异步是指执行一些长时间运行的操作,不需要阻止调用线程的程序,例如访问网络,调用Web服务或执行任何其他I / O操作一般。

In this article we will look how to write programs that perform asynchronous operations without the typical inversion of control. To briefly introduce what I mean by 'asynchronous' and 'inversion of control' - asynchronous refers to programs that perform some long running operations that don't necessary block a calling thread, for example accessing the network, calling web services or performing any other I/O operation in general.

这篇关于有没有C#反应堆/原子库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆