是否调度事件中断函数吗? [英] Does dispatching an event interrupt a function?

查看:256
本文介绍了是否调度事件中断函数吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设函数foo()被执行。假设外部事件发生时,您拥有一个处理程序。将函数foo()被中断,这样的事件处理程序可以执行?什么是执行在这种情况下的订单?

Let's say function foo() is executing. Suppose that an external event occurs, for which you have a handler. Will function foo() be interrupted so that the event handler can be executed? What is the order of execution in this situation?

推荐答案

没有, FOO()就不会被打断。

Flex是单线程的,所以 FOO()将继续运行。一旦富()结束并且控制返回到事件循环,然后在事件队列中的第一个事件将被处理。

Flex is single-threaded, so foo() will continue running. Once foo() finishes and control is returned to the event loop, then the first event in the event queue will be processed.

这篇关于是否调度事件中断函数吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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