| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Major changes:
OneShotTimer and RepeatingTimer become template classes that no longer require
a Task or a Timer object. They just use PostDelayedTask. Under the hood that
still uses a Timer object.
The API is much simpler for consumers as they now no longer need to worry about
allocating a Task or managing the lifetime of the object pointer held by the
Task.
I added some new unit tests to timer_unittest.cc to cover the API.
I preserved the old TimerManager / Timer API for now, but I plan to soon kill
it.
R=brettw
BUG=1346553
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1502 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
call this when there is no MessageLoop for the current thread.
TBR=jabdelmalek
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1372 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL introduces a Type enum to MessageLoop, and I also created subclasses of MessageLoop corresponding to the non-default types: MessageLoopForIO and MessageLoopForUI.
I moved all of the platform-specific MessageLoop APIs onto either MessageLoopForIO or MessageLoopForUI. MessageLoopForIO gets the Watcher API, and MessageLoopForUI gets the Observer and Dispatcher APIs. Under the hood, both are implemented in terms of MessagePumpWin, but that will change in a future CL.
The Thread class is changed to allow the consumer to specify the Type of MessageLoop they want to have setup on the created thread.
I re-organized message_loop_unittest.cc and timer_unittest.cc so that I could exercise all (or most) of the tests against each type of MessageLoop.
Note: I know that "explicit MessageLoop(Type type = TYPE_DEFAULT);" is in violation to the style-guide's restriction against default arguments. I'm working on finding a decent solution to that problem. Please ignore this issue for now.
The corresponding chrome/ changes are coming in a separate CL due to Reitveld data size limitations.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1362 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
uninitialized. This isn't true for the pthread_key_t type, which is unsigned on Linux and reportedly a struct on Macs. This change modifies the Slot type to be a struct containing an "initialized" flag.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1122 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1118 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
uninitialized. This isn't true for the pthread_key_t type, which is unsigned on Linux and reportedly a struct on Macs. This change modifies the Slot type to be a struct containing an "initialized" flag.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1113 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1084 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1078 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
fire time of the next timer. I changed the MessagePump API to refer to a delayed_work_time instead of a delay.
I moved the ceil-based rounding code into the Window's implementations of WaitableEvent and MessagePump.
R=jar
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1075 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
R=jar
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@973 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@936 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MessageLoop. A MessageLoop now has a MessagePump.
This will make it possible to port the MessagePump interface to other platforms
as well as to use an IO completion port for our worker threads on Windows.
Currently, there is only MessagePumpWin, which attempts to preserve the
pre-existing behavior of the MessageLoop.
API changes to MessageLoop:
1. MessageLoop::Quit means return from Run when the MessageLoop would
otherwise wait for more work.
2. MessageLoop::Quit can no longer be called outside the context of an active Run
call. So, things like this:
MessageLoop::current()->Quit();
MessageLoop::current()->Run();
are now:
MessageLoop::current()->RunAllPending();
3. MessageLoop::Quit can no longer be called from other threads. This means that
PostTask(..., new MessageLoop::QuitTask()) must be used explicitly to Quit across
thread boundaries.
4. No protection is made to deal with nested MessageLoops involving watched
objects or APCs. In fact, an assertion is added to flag such cases. This is a
temporary measure until object watching and APC facilities are removed in favor
of a MessagePump designed around an IO completion port.
As part of this CL, I also changed the automation system to use an
IPC::ChannelProxy instead of an IPC::Channel. This moves the automation IPC
onto Chrome's IO thread where it belongs. I also fixed some abuses of
RefCounted in the AutomationProvider class. It was deleting itself in some
cases! This led to having to fix the ownership model for AutomationProvider,
which explains the changes to AutomationProviderList and so on.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@928 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Please note that the goal of this CL is merely to move the Windowisms out of timer.cc and into message_loop.cc. Next up will be to refactor message_loop.cc so that the Windowisms are further isolated.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@734 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
BUG=none
TEST=none; this is just a doc change.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@678 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
the real MessageLoop changes.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@459 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
destroyed. This might also be generically useful, so I added a new API on ML to observe when the ML is being destroyed. The notification is sent to observers just prior to ML::current() being modified to return NULL.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@407 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
TBR
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@299 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
I use a counter of MessageLoop::Quit() calls so that I can re-post "extra" calls when MessageLoop::Run() terminates. This assures that no quits are lost... but I'm not sure if some code abused the Quit() calls, and already posts many-too-many quits :-/. I want to see if the tree tests go red, and how the distributed reliability test responds.
The test should already pass the basic unit_test and base_unittest, but I'm not sure what the rest of the UI tests etc will do. If I'm lucky, they'll be "less" flakey. ...but they may just go red all over :-(
TBR
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@298 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
PostSignaledTask since it won't be used.
TBR=jar
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
proress by Darin) to Post the task (when the object is signaled) into a message
loop.
I also cleaned up the time-of-birth for tasks that sleep for a while before
running (such as those held by the timer, or by passed to this new
PostSignaledTask() interface.
r=darin
M base/tracked.cc
M base/message_loop.h
M base/message_loop.cc
M base/tracked.h
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ipc_sync_channel.
RunOnce() semantics were not sufficient to support the effort to pump messages
in ipc_sync_channel, as ipc_sync_channel is not able to detect pending Tasks.
This change list switches to RunAllPending() tasks, rather than just Running the items
that avail themselves in one run of the loop. This is a very small mod of the existing code.
I'm still trying to stay focused on the bug at hand, and minimize chances of
unrelated regressions (we only modify IPC channel semantics).
The slight semantic change (from original attempts to call Quit() externally and
then Run()) is that we now terminate the message loop after also servicing the
high-resolution timer tasks.
bug=1291034
r=darin
M base/message_loop.h
M base/message_loop.cc
M chrome/common/ipc_sync_channel.cc
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deeply nested calls to MessageLoop::Run() were made, and
a multitude of Quit() messages were handled at the most
nested level. This left outer invocations hung, waiting for
"their" kQuitMsg to arrive (but the the nested loop had
already discarded them in its processing of pending messages
before exit :-/ ).
We now use a more controlled run of the message loop, which
does not rely on kQuitMsg.
This re-landing doesn't have the anti-hang assertion, which was
breaking a lot of tests.
bug=1291034
r=darin,mpcomplete
M base/message_loop.h
M base/message_loop.cc
M chrome/common/ipc_sync_channel.cc
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
M base/message_loop.h
M base/message_loop.cc
M chrome/common/ipc_sync_channel.cc
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
M base/message_loop.cc
M chrome/common/ipc_sync_channel.cc
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed projects that are set as "Application (.exe)" but that don't build an application. Converted then to "Utility".
util_prebuild, V8Config and V8Bindings_prebuild.
Fixed a template compilation error in message_loop.h
Changed PROP_ENTRY to PROP_ENTRY_TYPE since the former is now deprecated.
Everything still builds fine on VS2005.
BUG=1290595
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44 0039d316-1c4b-4281-b951-d872f2087c98
|
|
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98
|