XPCOM:nsIThreadManager

From MozillaWiki
Revision as of 16:38, 12 January 2006 by Darin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In a world without nested event queues, the concept of a thread and an event queue merge...

[scriptable, uuid(...)]
interface nsIThreadManager : nsISupports {
  nsIThread newThread(in ACString name);
  nsIThread getThread(in ACString name);
  void registerThread(in nsIThread thread);
  void unregisterThread(in nsIThread thread);
  void shutdownAll();
};
 
[scriptable, uuid(...)]
interface nsIThread : nsISupports {
  readonly attribute ACString name;
  void shutdown();
  void dispatch(in nsIRunnable task, in long flags);
  const long DISPATCH_SYNC = 1;
  nsIRunnable getNextTask();
};