XPCOM:nsIThreadManager: Difference between revisions

Jump to navigation Jump to search
m
Line 211: Line 211:
   }
   }
  };
  };
Dispatching <code>MyEvent</code> is then as simple as:
nsCOMPtr<nsIThread> thread = do_GetCurrentThread();
NS_ENSURE_STATE(thread);
&nbsp;
nsCOMPtr<nsIRunnable> event = new MyEvent();
NS_ENSURE_STATE(event);
&nbsp;
thread->Dispatch(event, NS_DISPATCH_NORMAL);


== Remarks ==
== Remarks ==
272

edits

Navigation menu