272
edits
| Line 246: | Line 246: | ||
NS_METHOD NS_DispatchToMainThread(nsIRunnable *event, | NS_METHOD NS_DispatchToMainThread(nsIRunnable *event, | ||
PRUint32 dispatchFlags = NS_DISPATCH_NORMAL); | PRUint32 dispatchFlags = NS_DISPATCH_NORMAL); | ||
| |||
/** | |||
* Process all pending events for the given thread before returning. This | |||
* method simply calls ProcessNextEvent on the thread while HasPendingEvents | |||
* continues to return true and the time spent in NS_ProcessPendingEvents | |||
* does not exceed the given timeout value. | |||
* | |||
* @param thread | |||
* The thread object for which to process pending events. If null, | |||
* then events will be processed for the current thread. | |||
* @param timeout | |||
* The maximum number of milliseconds to spend processing pending | |||
* events. Events are not pre-empted to honor this timeout. Rather, | |||
* the timeout value is simply used to determine whether or not to | |||
* process another event. Pass PR_INTERVAL_NO_TIMEOUT to specify no | |||
* timeout. | |||
*/ | |||
NS_METHOD NS_ProcessPendingEvents(nsIThread *thread = nsnull, | |||
PRIntervalTime timeout = PR_INTERVAL_NO_TIMEOUT); | |||
=== nsCOMPtr helpers === | === nsCOMPtr helpers === | ||
edits