Home | History | Annotate | Download | only in base

Lines Matching refs:Task

16 #include "base/task.h"
32 // Events include at a minimum Task instances submitted to PostTask or those
41 // NOTE: MessageLoop has task reentrancy protection. This means that if a
42 // task is being processed, a second task cannot start until the first task is
43 // finished. Reentrancy can happen when processing a task, and an inner
45 // which could implicitly start an inner task. Inner message pumps are created
49 // Sample workaround when inner task processing is needed:
56 // Please be SURE your task is reentrant (nestable) and all global variables
85 // The "PostTask" family of methods call the task's Run method asynchronously
93 // dispatch the task from a nested invocation of MessageLoop::Run. Instead,
96 // The MessageLoop takes ownership of the Task, and deletes it after it has
99 // NOTE: These methods may be called on any thread. The Task will be invoked
103 const tracked_objects::Location& from_here, Task* task);
106 const tracked_objects::Location& from_here, Task* task, int64 delay_ms);
109 const tracked_objects::Location& from_here, Task* task);
112 const tracked_objects::Location& from_here, Task* task, int64 delay_ms);
163 class QuitTask : public Task {
208 // Enables or disables the recursive task processing. This happens in the case
210 // using common controls or printer functions. By default, recursive task
215 // - It receives a task #1 and execute it.
216 // - The task #1 implicitly start a message loop, like a MessageBox in the
218 // - The thread receives a task #2 before or while in this second message
220 // - With NestableTasksAllowed set to true, the task #2 will run right away.
221 // Otherwise, it will get executed right after task #1 completes at "thread
288 Task* task; // The task to run.
289 base::Time delayed_run_time; // The time when the task should be run.
293 PendingTask(Task* task, bool nestable)
294 : task(task), sequence_num(0), nestable(nestable) {
339 // Run a work_queue_ task or new_task, and delete it (if it was processed by
342 // case, the method will run one pending task (if any exist). Returns true if
343 // it executes a task. Queued tasks accumulate only when there is a
344 // non-nestable task currently processing, in which case the new_task is
347 // the context of a task.
348 bool QueueOrRunTask(Task* new_task);
350 // Runs the specified task and deletes it.
351 void RunTask(Task* task);
353 // Calls RunTask or queues the pending_task on the deferred task list if it
354 // cannot be run right now. Returns true if the task was run.
357 // Adds the pending task to delayed_work_queue_.
366 // destructor to make sure all the task's destructors get called. Returns
370 // Post a task to our incomming queue.
371 void PostTask_Helper(const tracked_objects::Location& from_here, Task* task,