nsIThreadInternal 编辑

The nsIThreadInternal interface is implemented by the XPCOM thread object to let consumers observe dispatch activity on a thread.

xpcom/threads/nsIThreadInternal.idlScriptable Please add a summary to this article.   Last changed in Gecko 1.9 (Firefox 3)

Inherits from: nsIThread

Method overview

void popEventQueue();
void pushEventQueue(in nsIThreadEventFilter filter);

Attributes

AttributeTypeDescription
observernsIThreadObserverGet/set the current thread observer; set to null to disable observing. This attribute may be read from any thread but must only be set on the thread corresponding to this thread object. The observer will be released on the thread corresponding to this thread object after all other events have been processed during a call to Shutdown.

Methods

popEventQueue()

Reverts a call to PushEventQueue(). When an event queue is popped, any events remaining in the queue are appended to the elder queue.

void popEventQueue();
Parameters

None.

pushEventQueue()

Causes any events currently enqueued on the thread to be suppressed until PopEventQueue() is called. In addition, any new events dispatched to the thread are only processed if they are accepted by the specified filter.

If the filter is null, all new events are accepted.

Calls to pushEventQueue() may be nested, and must each be paired with a corresponding call to PopEventQueue() to restore the original state of the thread.

void pushEventQueue(
  in nsIThreadEventFilter filter
);
Parameters
filter
The nsIThreadEventFilter to apply to dispatched events, or null to accept all dispatched events.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:123 次

字数:4579

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文