LeviLamina
Loading...
Searching...
No Matches
BackgroundWorker Class Reference
Inheritance diagram for BackgroundWorker:

Public Types

enum class  RunOneResult : int { NoTasks = 0 , TaskExecuted = 1 , Retry = 2 }
enum class  State : int { Initializing = 0 , Off = 1 , Running = 2 }
using SortingJobQueue
using TaskPipe = ::SPSCQueue<::std::shared_ptr<::BackgroundTaskBase>, 512>

Public Member Functions

BackgroundWorker & operator= (BackgroundWorker const &)
 BackgroundWorker (BackgroundWorker const &)
virtual bool isAsync () const
virtual bool canTaskRunAgain () const
MCAPI BackgroundWorker (::std::string_view name, ::Core::Profile::ThreadFrameType frameType, bool async, ::Bedrock::Threading::OSThreadPriority const &priority, ::std::optional< uint64 > const coreAffinity, ::std::optional< int > const idealCore, ::WorkerPool &workerPool)
MCAPI bool _processNextTask (::RunTaskOptions const &options)
MCAPI void queue (::std::shared_ptr<::BackgroundTaskBase > task)
MCAPI void requestStop (bool wait)
MCAPI void start ()
MCAPI void * $ctor (::std::string_view name, ::Core::Profile::ThreadFrameType frameType, bool async, ::Bedrock::Threading::OSThreadPriority const &priority, ::std::optional< uint64 > const coreAffinity, ::std::optional< int > const idealCore, ::WorkerPool &workerPool)
MCFOLD bool $isAsync () const
MCAPI bool $canTaskRunAgain () const

Static Public Member Functions

::BackgroundWorker * getLocal ()
static MCAPI ::BackgroundWorker *& gLocalWorkerMappingSingleton ()

Public Attributes

::ll::TypedStorage< 1, 1, bool const > mAsync
::ll::TypedStorage< 4, 4, ::Bedrock::Threading::OSThreadPriority > mPriority
::ll::TypedStorage< 8, 16, ::std::optional< uint64 > > mCoreAffinity
::ll::TypedStorage< 4, 8, ::std::optional< int > > mIdealCore
::ll::TypedStorage< 8, 32, ::std::string > mName
::ll::TypedStorage< 1, 1, ::Core::Profile::ThreadFrameType > mFrameType
::ll::TypedStorage< 8, 16, ::std::thread > mThread
::ll::TypedStorage< 4, 4, ::std::thread::id > mWorkerThreadID
::ll::TypedStorage< 4, 4, ::std::atomic<::BackgroundWorker::State > > mState
::ll::TypedStorage< 8, 160, ::ResetEventObj > mResetEvent
::ll::TypedStorage< 1, 1, ::std::atomic< bool > > mIdle
::ll::TypedStorage< 8, 8, ::std::chrono::steady_clock::time_point > mIdleSinceTime
::ll::TypedStorage< 8, 16, ::std::shared_ptr<::BackgroundTaskBase > > mCurrentTask
::ll::TypedStorage< 8, 8, ::WorkerPool & > mWorkerPool
::ll::TypedStorage< 8, 8, ::std::chrono::nanoseconds > mMaxSpinlockDuration
::ll::TypedStorage< 8, 360, ::BackgroundTaskQueue > mTaskQueue

Member Typedef Documentation

◆ SortingJobQueue

using BackgroundWorker::SortingJobQueue

Member Function Documentation

◆ isAsync()

virtual bool BackgroundWorker::isAsync ( ) const
virtual

Implements ITaskExecutionContext.

◆ canTaskRunAgain()

virtual bool BackgroundWorker::canTaskRunAgain ( ) const
virtual

Implements ITaskExecutionContext.


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