• Home
  • Raw
  • Download

Lines Matching full:thread

28 // A simple thread abstraction that establishes a MessageLoop on a new thread.
29 // The consumer uses the MessageLoop of the thread to cause code to execute on
30 // the thread. When this object is destroyed the thread is terminated. All
31 // pending tasks queued on the thread's message loop will run to completion
32 // before the thread is terminated.
34 // WARNING! SUBCLASSES MUST CALL Stop() IN THEIR DESTRUCTORS! See ~Thread().
36 // After the thread is stopped, the destruction sequence is:
38 // (1) Thread::CleanUp()
41 class BASE_EXPORT Thread : PlatformThread::Delegate {
51 // Specifies the type of message loop that will be allocated on the thread.
55 // Specifies timer slack for thread message loop.
59 // on the thread. If message_pump_factory.is_null(), then a MessagePump
64 // Specifies the maximum stack size that the thread is allowed to use.
65 // This does not necessarily correspond to the thread's initial stack size.
69 // Specifies the initial thread priority.
74 // name is a display string to identify the thread.
75 explicit Thread(const std::string& name);
77 // Destroys the thread, stopping it if necessary.
79 // NOTE: ALL SUBCLASSES OF Thread MUST CALL Stop() IN THEIR DESTRUCTORS (or
82 // vtable, and the thread's ThreadMain calling the virtual method Run(). It
85 ~Thread() override;
88 // Causes the thread to initialize COM. This must be called before calling
89 // Start() or StartWithOptions(). If |use_mta| is false, the thread is also
99 // Starts the thread. Returns true if the thread was successfully started;
108 // Starts the thread. Behaves exactly like Start in addition to allow to
116 // Starts the thread and wait for the thread to start and run initialization
120 // jank on the calling thread, should be used only in testing code.
123 // Blocks until the thread starts running. Called within StartAndWait().
124 // Note that calling this causes jank on the calling thread, must be used
128 // Signals the thread to exit and returns once the thread has exited. After
129 // this method returns, the Thread object is completely reset and may be used
132 // Stop may be called multiple times and is simply ignored if the thread is
135 // NOTE: If you are a consumer of Thread, it is not necessary to call this
136 // before deleting your Thread objects, as the destructor will do it.
137 // IF YOU ARE A SUBCLASS OF Thread, YOU MUST CALL THIS IN YOUR DESTRUCTOR.
140 // Signals the thread to exit in the near future.
145 // deadlock on Windows with printer worker thread. In any other case, Stop()
150 // the thread object once it is known that the thread has quit.
153 // Returns the message loop for this thread. Use the MessageLoop's
154 // PostTask methods to execute code on the thread. This only returns
159 // the Thread's Stop method instead.
163 // Returns a TaskRunner for this thread. Use the TaskRunner's PostTask
164 // methods to execute code on the thread. Returns nullptr if the thread is not
166 // hold on to this even after the thread is gone; in this situation, attempts
172 // Returns the name of this thread (for display in debugger too).
175 // The native thread handle.
178 // Returns the thread ID. Should not be called before the first Start*()
182 // WARNING: This function will block if the thread hasn't started yet.
186 // Returns true if the thread has been started, and not yet stopped.
219 // Whether this thread needs to initialize COM, and if so, in what mode.
225 // Should be written on the thread that created this thread. Also read data
233 // The thread's handle.
237 // The thread's id once it has started.
241 // The thread's message loop. Valid only while the thread is alive. Set
242 // by the created thread.
246 // a thread.
249 // The name of the thread. Used for debugging purposes.
252 // Signaled when the created thread gets ready to use the message loop.
257 DISALLOW_COPY_AND_ASSIGN(Thread);