是事件处理程序处理异步? [英] Are Event Handlers processed Asynchronously?

查看:125
本文介绍了是事件处理程序处理异步?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VB .NET中,当你调用的RaiseEvent X(),是处理点¯x同步或异步处理事件的函数。我是IM pression说的RaiseEvent和事件的处理是同步,除非显式地在另一个线程创建下。有人告诉我,否则虽然。

In VB .NET, when you call RaiseEvent X(), is the function that handles the event X processed asynchronously or synchronously. I was under the impression that RaiseEvent and the processing of the event were Synchronous unless created explictly on another thread. I've been told otherwise though.

推荐答案

事件被同步默认情况下提出的。由于<一个href=\"http://msdn.microsoft.com/en-us/library/system.multicastdelegate.aspx\"><$c$c>MulticastDelegates旨在支持异步调用,可以调用在异步事件的调用列表代表,但这不是默认的行为。

Events are raised synchronously by default. Since MulticastDelegates are designed to support asynchronous invocation it is possible to invoke the delegates in an event's invocation list asynchronously but this is not the default behavior.

这篇关于是事件处理程序处理异步?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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