webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
rtc::Thread Class Reference

#include <thread.h>

Inheritance diagram for rtc::Thread:
rtc::MessageQueue rtc::MessageQueue CustomThread OwnerThread rtc::AutoThread rtc::AutoThread rtc::LogThread SignalWhenDestroyedThread

Classes

class  ScopedDisallowBlockingCalls
 

Public Member Functions

 Thread ()
 
 Thread (SocketServer *ss)
 
 Thread (std::unique_ptr< SocketServer > ss)
 
 ~Thread () override
 
bool IsCurrent () const
 
const std::stringname () const
 
bool SetName (const std::string &name, const void *obj)
 
bool Start (Runnable *runnable=nullptr)
 
virtual void Stop ()
 
virtual void Run ()
 
virtual void Send (const Location &posted_from, MessageHandler *phandler, uint32_t id=0, MessageData *pdata=nullptr)
 
template<class ReturnT , class FunctorT >
ReturnT Invoke (const Location &posted_from, const FunctorT &functor)
 
void Clear (MessageHandler *phandler, uint32_t id=MQID_ANY, MessageList *removed=nullptr) override
 
void ReceiveSends () override
 
bool ProcessMessages (int cms)
 
bool IsOwned ()
 
bool RunningForTest ()
 
bool SetAllowBlockingCalls (bool allow)
 
bool WrapCurrent ()
 
void UnwrapCurrent ()
 
 Thread ()
 
 Thread (SocketServer *ss)
 
 Thread (std::unique_ptr< SocketServer > ss)
 
 ~Thread () override
 
bool IsCurrent () const
 
const std::stringname () const
 
bool SetName (const std::string &name, const void *obj)
 
bool Start (Runnable *runnable=nullptr)
 
virtual void Stop ()
 
virtual void Run ()
 
virtual void Send (const Location &posted_from, MessageHandler *phandler, uint32_t id=0, MessageData *pdata=nullptr)
 
template<class ReturnT , class FunctorT >
ReturnT Invoke (const Location &posted_from, const FunctorT &functor)
 
void Clear (MessageHandler *phandler, uint32_t id=MQID_ANY, MessageList *removed=nullptr) override
 
void ReceiveSends () override
 
bool ProcessMessages (int cms)
 
bool IsOwned ()
 
bool RunningForTest ()
 
bool SetAllowBlockingCalls (bool allow)
 
bool WrapCurrent ()
 
void UnwrapCurrent ()
 
- Public Member Functions inherited from rtc::MessageQueue
 MessageQueue (SocketServer *ss, bool init_queue)
 
 MessageQueue (std::unique_ptr< SocketServer > ss, bool init_queue)
 
virtual ~MessageQueue ()
 
SocketServersocketserver ()
 
void set_socketserver (SocketServer *ss)
 
virtual void Quit ()
 
virtual bool IsQuitting ()
 
virtual void Restart ()
 
virtual bool IsProcessingMessages ()
 
virtual bool Get (Message *pmsg, int cmsWait=kForever, bool process_io=true)
 
virtual bool Peek (Message *pmsg, int cmsWait=0)
 
virtual void Post (const Location &posted_from, MessageHandler *phandler, uint32_t id=0, MessageData *pdata=nullptr, bool time_sensitive=false)
 
virtual void PostDelayed (const Location &posted_from, int cmsDelay, MessageHandler *phandler, uint32_t id=0, MessageData *pdata=nullptr)
 
virtual void PostAt (const Location &posted_from, int64_t tstamp, MessageHandler *phandler, uint32_t id=0, MessageData *pdata=nullptr)
 
virtual void PostAt (const Location &posted_from, uint32_t tstamp, MessageHandler *phandler, uint32_t id=0, MessageData *pdata=nullptr)
 
virtual void Dispatch (Message *pmsg)
 
virtual int GetDelay ()
 
bool empty () const
 
size_t size () const
 
template<class T >
void Dispose (T *doomed)
 
 MessageQueue (SocketServer *ss, bool init_queue)
 
 MessageQueue (std::unique_ptr< SocketServer > ss, bool init_queue)
 
virtual ~MessageQueue ()
 
SocketServersocketserver ()
 
void set_socketserver (SocketServer *ss)
 
virtual void Quit ()
 
virtual bool IsQuitting ()
 
virtual void Restart ()
 
virtual bool IsProcessingMessages ()
 
virtual bool Get (Message *pmsg, int cmsWait=kForever, bool process_io=true)
 
virtual bool Peek (Message *pmsg, int cmsWait=0)
 
virtual void Post (const Location &posted_from, MessageHandler *phandler, uint32_t id=0, MessageData *pdata=nullptr, bool time_sensitive=false)
 
virtual void PostDelayed (const Location &posted_from, int cmsDelay, MessageHandler *phandler, uint32_t id=0, MessageData *pdata=nullptr)
 
virtual void PostAt (const Location &posted_from, int64_t tstamp, MessageHandler *phandler, uint32_t id=0, MessageData *pdata=nullptr)
 
virtual void PostAt (const Location &posted_from, uint32_t tstamp, MessageHandler *phandler, uint32_t id=0, MessageData *pdata=nullptr)
 
virtual void Dispatch (Message *pmsg)
 
virtual int GetDelay ()
 
bool empty () const
 
size_t size () const
 
template<class T >
void Dispose (T *doomed)
 

Static Public Member Functions

static std::unique_ptr< ThreadCreateWithSocketServer ()
 
static std::unique_ptr< ThreadCreate ()
 
static ThreadCurrent ()
 
static bool SleepMs (int millis)
 
static std::unique_ptr< ThreadCreateWithSocketServer ()
 
static std::unique_ptr< ThreadCreate ()
 
static ThreadCurrent ()
 
static bool SleepMs (int millis)
 

Protected Member Functions

void SafeWrapCurrent ()
 
void Join ()
 
void SafeWrapCurrent ()
 
void Join ()
 
- Protected Member Functions inherited from rtc::MessageQueue
void DoDelayPost (const Location &posted_from, int64_t cmsDelay, int64_t tstamp, MessageHandler *phandler, uint32_t id, MessageData *pdata)
 
void DoInit ()
 
void DoDestroy ()
 
void WakeUpSocketServer ()
 
MessageList msgq_ GUARDED_BY (crit_)
 
PriorityQueue dmsgq_ GUARDED_BY (crit_)
 
uint32_t dmsgq_next_num_ GUARDED_BY (crit_)
 
void DoDelayPost (const Location &posted_from, int64_t cmsDelay, int64_t tstamp, MessageHandler *phandler, uint32_t id, MessageData *pdata)
 
void DoInit ()
 
void DoDestroy ()
 
void WakeUpSocketServer ()
 
MessageList msgq_ GUARDED_BY (crit_)
 
PriorityQueue dmsgq_ GUARDED_BY (crit_)
 
uint32_t dmsgq_next_num_ GUARDED_BY (crit_)
 

Static Protected Member Functions

static void AssertBlockingIsAllowedOnCurrentThread ()
 
static void AssertBlockingIsAllowedOnCurrentThread ()
 

Friends

class ScopedDisallowBlockingCalls
 
class ThreadManager
 

Additional Inherited Members

- Public Attributes inherited from rtc::MessageQueue
sigslot::signal0 SignalQueueDestroyed
 
- Static Public Attributes inherited from rtc::MessageQueue
static const int kForever = -1
 
- Protected Attributes inherited from rtc::MessageQueue
bool fPeekKeep_
 
Message msgPeek_
 
CriticalSection crit_
 
bool fInitialized_
 
bool fDestroyed_
 

Constructor & Destructor Documentation

◆ Thread() [1/6]

rtc::Thread::Thread ( )

◆ Thread() [2/6]

rtc::Thread::Thread ( SocketServer ss)
explicit

◆ Thread() [3/6]

rtc::Thread::Thread ( std::unique_ptr< SocketServer ss)
explicit

◆ ~Thread() [1/2]

rtc::Thread::~Thread ( )
override

◆ Thread() [4/6]

rtc::Thread::Thread ( )

◆ Thread() [5/6]

rtc::Thread::Thread ( SocketServer ss)
explicit

◆ Thread() [6/6]

rtc::Thread::Thread ( std::unique_ptr< SocketServer ss)
explicit

◆ ~Thread() [2/2]

rtc::Thread::~Thread ( )
override

Member Function Documentation

◆ AssertBlockingIsAllowedOnCurrentThread() [1/2]

void rtc::Thread::AssertBlockingIsAllowedOnCurrentThread ( )
staticprotected

◆ AssertBlockingIsAllowedOnCurrentThread() [2/2]

static void rtc::Thread::AssertBlockingIsAllowedOnCurrentThread ( )
staticprotected

◆ Clear() [1/2]

void rtc::Thread::Clear ( MessageHandler phandler,
uint32_t  id = MQID_ANY,
MessageList removed = nullptr 
)
overridevirtual

Reimplemented from rtc::MessageQueue.

◆ Clear() [2/2]

void rtc::Thread::Clear ( MessageHandler phandler,
uint32_t  id = MQID_ANY,
MessageList removed = nullptr 
)
overridevirtual

Reimplemented from rtc::MessageQueue.

◆ Create() [1/2]

std::unique_ptr< Thread > rtc::Thread::Create ( )
static

◆ Create() [2/2]

static std::unique_ptr<Thread> rtc::Thread::Create ( )
static

◆ CreateWithSocketServer() [1/2]

std::unique_ptr< Thread > rtc::Thread::CreateWithSocketServer ( )
static

◆ CreateWithSocketServer() [2/2]

static std::unique_ptr<Thread> rtc::Thread::CreateWithSocketServer ( )
static

◆ Current() [1/2]

Thread * rtc::Thread::Current ( )
static

◆ Current() [2/2]

static Thread* rtc::Thread::Current ( )
static

◆ Invoke() [1/2]

template<class ReturnT , class FunctorT >
ReturnT rtc::Thread::Invoke ( const Location posted_from,
const FunctorT &  functor 
)
inline

◆ Invoke() [2/2]

template<class ReturnT , class FunctorT >
ReturnT rtc::Thread::Invoke ( const Location posted_from,
const FunctorT &  functor 
)
inline

◆ IsCurrent() [1/2]

bool rtc::Thread::IsCurrent ( ) const
inline

◆ IsCurrent() [2/2]

bool rtc::Thread::IsCurrent ( ) const
inline

◆ IsOwned() [1/2]

bool rtc::Thread::IsOwned ( )

◆ IsOwned() [2/2]

bool rtc::Thread::IsOwned ( )

◆ Join() [1/2]

void rtc::Thread::Join ( )
protected

◆ Join() [2/2]

void rtc::Thread::Join ( )
protected

◆ name() [1/2]

const std::string& rtc::Thread::name ( ) const
inline

◆ name() [2/2]

const std::string& rtc::Thread::name ( ) const
inline

◆ ProcessMessages() [1/2]

bool rtc::Thread::ProcessMessages ( int  cms)

◆ ProcessMessages() [2/2]

bool rtc::Thread::ProcessMessages ( int  cms)

◆ ReceiveSends() [1/2]

void rtc::Thread::ReceiveSends ( )
overridevirtual

Reimplemented from rtc::MessageQueue.

◆ ReceiveSends() [2/2]

void rtc::Thread::ReceiveSends ( )
overridevirtual

Reimplemented from rtc::MessageQueue.

◆ Run() [1/2]

virtual void rtc::Thread::Run ( )
virtual

Reimplemented in SignalWhenDestroyedThread, and OwnerThread.

◆ Run() [2/2]

void rtc::Thread::Run ( )
virtual

Reimplemented in SignalWhenDestroyedThread, and OwnerThread.

◆ RunningForTest() [1/2]

bool rtc::Thread::RunningForTest ( )
inline

◆ RunningForTest() [2/2]

bool rtc::Thread::RunningForTest ( )
inline

◆ SafeWrapCurrent() [1/2]

void rtc::Thread::SafeWrapCurrent ( )
protected

◆ SafeWrapCurrent() [2/2]

void rtc::Thread::SafeWrapCurrent ( )
protected

◆ Send() [1/2]

void rtc::Thread::Send ( const Location posted_from,
MessageHandler phandler,
uint32_t  id = 0,
MessageData pdata = nullptr 
)
virtual

◆ Send() [2/2]

virtual void rtc::Thread::Send ( const Location posted_from,
MessageHandler phandler,
uint32_t  id = 0,
MessageData pdata = nullptr 
)
virtual

◆ SetAllowBlockingCalls() [1/2]

bool rtc::Thread::SetAllowBlockingCalls ( bool  allow)

◆ SetAllowBlockingCalls() [2/2]

bool rtc::Thread::SetAllowBlockingCalls ( bool  allow)

◆ SetName() [1/2]

bool rtc::Thread::SetName ( const std::string name,
const void obj 
)

◆ SetName() [2/2]

bool rtc::Thread::SetName ( const std::string name,
const void obj 
)

◆ SleepMs() [1/2]

bool rtc::Thread::SleepMs ( int  millis)
static

◆ SleepMs() [2/2]

static bool rtc::Thread::SleepMs ( int  millis)
static

◆ Start() [1/2]

bool rtc::Thread::Start ( Runnable runnable = nullptr)

◆ Start() [2/2]

bool rtc::Thread::Start ( Runnable runnable = nullptr)

◆ Stop() [1/2]

void rtc::Thread::Stop ( )
virtual

◆ Stop() [2/2]

virtual void rtc::Thread::Stop ( )
virtual

◆ UnwrapCurrent() [1/2]

void rtc::Thread::UnwrapCurrent ( )

◆ UnwrapCurrent() [2/2]

void rtc::Thread::UnwrapCurrent ( )

◆ WrapCurrent() [1/2]

bool rtc::Thread::WrapCurrent ( )

◆ WrapCurrent() [2/2]

bool rtc::Thread::WrapCurrent ( )

Friends And Related Function Documentation

◆ ScopedDisallowBlockingCalls

◆ ThreadManager

ThreadManager
friend

The documentation for this class was generated from the following files: