//  // // ##### #### # # -= Threadux =-  // //  # # # ## ## ThreadPool.cpp  // //  # # # ##  // //  # # # ### Scalable workload distribution server  // //  # # # ## ##  // //  # #### # # R1 2004 by Markus Ewald  // //  // #include "Threadux/ThreadPool.h" #define WIN32_LEAN_AND_MEAN #include using namespace Threadux; // ############################################################################################# // // # Threadux::ThreadPool::ThreadPool() # // // ############################################################################################# // /** Returns the optimum thread count for a thread pool on the current machine. @return The machine's optimum thread pool size @todo Replace this dummy with an actual implementation! */ size_t ThreadPool::getOptimumThreadCount() { /* SYSTEM_LOGICAL_PROCESSOR_INFORMATION ProcessorInformation; DWORD Length = sizeof(ProcessorInformation); if(::GetLogicalProcessorInformation(&ProcessorInformation, &Length) == FALSE) throw runtime_error("Could not obtain processor informations"); */ return 4; // Great! } // ############################################################################################# // // # Threadux::ThreadPool::ThreadPool() # // // ############################################################################################# // ThreadPool::ThreadPool(size_t ThreadCount) : m_DesiredThreadCount(ThreadCount) {} // ############################################################################################# // // # Threadux::ThreadPool::~ThreadPool() # // // ############################################################################################# // ThreadPool::~ThreadPool() {} // ############################################################################################# // // # Threadux::ThreadPool::rescale() # // // ############################################################################################# // void ThreadPool::rescale(size_t ThreadCount) { m_DesiredThreadCount = ThreadCount; } // ############################################################################################# // // # Threadux::ThreadPool::enqueue() # // // ############################################################################################# // void ThreadPool::enqueue(const Invocation &TheInvocation) {}