----------------------------------------------------------------------------- Add a watcher to our object. -----------------------------------------------------------------------------
| 70 | // Add a watcher to our object. |
| 71 | //----------------------------------------------------------------------------- |
| 72 | void Wait::AddWatcher |
| 73 | ( |
| 74 | pfnWaitNotification_t _callback, |
| 75 | void* _context |
| 76 | ) |
| 77 | { |
| 78 | if( !_callback ) |
| 79 | { |
| 80 | assert(0); |
| 81 | return; |
| 82 | } |
| 83 | |
| 84 | // Add a ref so our object cannot disappear while being watched |
| 85 | AddRef(); |
| 86 | |
| 87 | // Add the watcher (platform specific code required here for thread safety) |
| 88 | m_pImpl->AddWatcher( _callback, _context ); |
| 89 | } |
| 90 | |
| 91 | //----------------------------------------------------------------------------- |
| 92 | // <Wait::RemoveWatcher> |