是否有一个C#反应器/摄库? [英] Is there a C# reactor/proactor library?

查看:155
本文介绍了是否有一个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#;

Have a read of Asynchronous Programming in C# using Iterators;

在这篇文章中,我们将看看怎么写,没有控制权的典型反向执行异步操作的程序。简单介绍一下我所说的异步和控制反转的意思是 - 异步指的是执行一些长时间运行操作不这样做必要的块调用线程,例如访问网络的程序,调用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天全站免登陆