// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // ThreadScheduler.cpp // // Source file containing the implementation for a thread based concrt scheduler // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #pragma once #include "concrtinternal.h" namespace Concurrency { namespace details { /// /// Creates a thread based scheduler /// ThreadScheduler::ThreadScheduler(_In_ const ::Concurrency::SchedulerPolicy& policy) : SchedulerBase(policy) { } /// /// Creates a thread based scheduler /// ThreadScheduler* ThreadScheduler::Create(_In_ const ::Concurrency::SchedulerPolicy& policy) { return _concrt_new ThreadScheduler(policy); } /// /// Creates a thread based virtual processor. /// VirtualProcessor* ThreadScheduler::CreateVirtualProcessor(SchedulingNode *pOwningNode, IVirtualProcessorRoot* pOwningRoot) { return _concrt_new ThreadVirtualProcessor(pOwningNode, pOwningRoot); } /// /// Returns a newly created thread internal context to the base scheduler. /// InternalContextBase *ThreadScheduler::CreateInternalContext() { return _concrt_new ThreadInternalContext(this); } /// /// Destroys a thread based scheduler /// ThreadScheduler::~ThreadScheduler() { } } // namespace details } // namespace Concurrency