272
edits
m (→Utilities) |
|||
Line 211: | Line 211: | ||
} | } | ||
}; | }; | ||
Dispatching <code>MyEvent</code> is then as simple as: | |||
nsCOMPtr<nsIThread> thread = do_GetCurrentThread(); | |||
NS_ENSURE_STATE(thread); | |||
| |||
nsCOMPtr<nsIRunnable> event = new MyEvent(); | |||
NS_ENSURE_STATE(event); | |||
| |||
thread->Dispatch(event, NS_DISPATCH_NORMAL); | |||
== Remarks == | == Remarks == |
edits