4#include <system/object.h>
7namespace System {
namespace Threading {
namespace Tasks {
26 int32_t
get_Id()
const {
return m_id;}
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Represents an asynchronous operation that can be awaited and composed with other tasks.
Definition: task.h:27
Represents an object that handles the low-level work of queuing tasks onto threads.
Definition: task_scheduler.h:11
virtual int32_t get_MaximumConcurrencyLevel() const
Indicates the maximum concurrency level this TaskScheduler is able to support.
virtual void QueueTask(const SharedPtr< Task > &)=0
bool TryExecuteTask(const SharedPtr< Task > &)
virtual bool TryExecuteTaskInline(const SharedPtr< Task > &, bool taskWasPreviouslyQueued)=0
static int32_t m_next_id
Definition: task_scheduler.h:44
static thread_local Task * m_current_task
Definition: task_scheduler.h:45
static const SharedPtr< TaskScheduler > & get_Default()
Gets the default TaskScheduler instance that is provided by the framework.
static SharedPtr< TaskScheduler > get_Current()
Gets the TaskScheduler associated with the currently executing task.
friend Task
Definition: task_scheduler.h:35
static SharedPtr< TaskScheduler > FromCurrentSynchronizationContext()
Creates a TaskScheduler associated with the current thread.
int32_t get_Id() const
Gets the unique ID for this TaskScheduler.
Definition: task_scheduler.h:26
int32_t m_id
Definition: task_scheduler.h:42
virtual bool TryDequeue(const SharedPtr< Task > &)
void DispatchCurrentContext()
Dispatches all tasks bound to this thread synchronously.
Definition: db_command.h:9