Index: base/message_loop.h |
diff --git a/base/message_loop.h b/base/message_loop.h |
index 0812c0fcc2902543ee4a01dfaa919af5971ce259..c47d9ddc8aaf36ba39f1ad35d8711e53687d440f 100644 |
--- a/base/message_loop.h |
+++ b/base/message_loop.h |
@@ -630,8 +630,26 @@ class BASE_EXPORT MessageLoopForIO : public MessageLoop { |
} |
#if defined(OS_WIN) |
- // Please see MessagePumpWin for definitions of these methods. |
- void RegisterIOHandler(HANDLE file_handle, IOHandler* handler); |
+ // Register the handler to be used when asynchronous IO for the given file |
+ // completes. The registration persists as long as |file_handle| is valid, so |
+ // |handler| must be valid as long as there is pending IO for the given file. |
+ void RegisterIOHandler(HANDLE file, IOHandler* handler); |
+ |
+ // Register the handler to be used to process job events. The registration |
+ // persists as long as the job object is live, so |handler| must be valid |
+ // until the job object is destoyed. Returns true if the registration |
rvargas (doing something else)
2012/08/13 18:54:12
typo: destroyed
alexeypa (please no reviews)
2012/08/13 20:02:23
Done.
|
+ // succeeded, and false otherwise. |
+ bool RegisterJobObject(HANDLE job, IOHandler* handler); |
+ |
+ // Waits for the next IO completion that should be processed by |filter|, for |
+ // up to |timeout| milliseconds. Return true if any IO operation completed, |
+ // regardless of the involved handler, and false if the timeout expired. If |
+ // the completion port received any message and the involved IO handler |
+ // matches |filter|, the callback is called before returning from this code; |
+ // if the handler is not the one that we are looking for, the callback will |
+ // be postponed for another time, so reentrancy problems can be avoided. |
+ // External use of this method should be reserved for the rare case when the |
+ // caller is willing to allow pausing regular task dispatching on this thread. |
bool WaitForIOCompletion(DWORD timeout, IOHandler* filter); |
protected: |