summaryrefslogtreecommitdiffstats
path: root/base/waitable_event.h
Commit message (Collapse)AuthorAgeFilesLines
* POSIX: Get IPCSyncChannel unittests workingagl@chromium.org2009-01-201-0/+3
| | | | | | | Review URL: http://codereview.chromium.org/18324 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8328 0039d316-1c4b-4281-b951-d872f2087c98
* Mac build fixagl@chromium.org2009-01-151-2/+2
| | | | | | | Review URL: http://codereview.chromium.org/18122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8138 0039d316-1c4b-4281-b951-d872f2087c98
* WaitableEvent is the replacement for Windows events. Previously in the code, ↵agl@chromium.org2009-01-151-8/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | a HANDLE from CreateEvent was used for signaling, both within a process and across processes. WaitableEvent is the cross platform replacement for this. To convert: * HANDLE -> base::WaitableEvent* * ScopedHandle -> scoped_ptr<base::WaitableEvent> * CreateEvent -> new base::WaitableEvent * SetEvent -> base::WaitableEvent::Signal * ResetEvent -> base::WaitableEvent::Reset * ObjectWatcher -> base::WaitableEventWatcher * WaitForMultipleObjects -> static base::WaitableEvent::WaitMany ObjectWatcher remains for Windows specific code. WaitableEventWatcher has an identical interface save, * It uses WaitableEvents, not HANDLEs * It returns void from StartWatching and StopWatcher, rather than errors. System internal errors are fatal to the address space IMPORTANT: There are semantic differences between the different platforms. WaitableEvents on Windows are implemented on top of events. Windows events work across process and this is used mostly for modal dialog support. Windows events can be duplicated with DuplicateHandle. On other platforms, WaitableEvent works only within a single process. In the future we shall have to replace the current uses of cross-process events with IPCs. BEWARE: HANDLE, on Windows, is a void *. Since any pointer type coerces to void *, you can pass a WaitableEvent * where a HANDLE is expected without any build-time errors. Review URL: http://codereview.chromium.org/16554 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8126 0039d316-1c4b-4281-b951-d872f2087c98
* Move Time, TimeDelta and TimeTicks into namespace base.dsh@google.com2008-10-271-3/+2
| | | | | | Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
* Set svn:eol-style = LF on files in base from which it is missingmmentovai@google.com2008-09-021-83/+83
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1648 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-107/+83
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Provide cross-platform implementation of WaitableEvent for use on Mac and Linux.darin@google.com2008-08-111-2/+15
| | | | | | | | | I gave the file the suffix _generic since it is implemented entirely in terms of other APIs in base. This CL also adds a simple unit test for WaitableEvent, and I switched some code in thread.cc over to using WaitableEvent. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@648 0039d316-1c4b-4281-b951-d872f2087c98
* A basic wrapper for a windows event object that encapsulates the way we ↵darin@google.com2008-08-091-0/+94
often use windows events. This API is not meant to be compatible with ObjectWatcher or MessageLoop::WatchObject. This API is meant to be easily ported to Mac & Linux using a traditional mutex and condition variable pairing. There's nothing to test here since the implementation is such a thin wrapper around Win32 APIs. However, once we go off to implement a posix version, we'll need some tests. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@620 0039d316-1c4b-4281-b951-d872f2087c98