Changeset View
Changeset View
Standalone View
Standalone View
source/ps/ThreadUtil.h
Show All 19 Lines | |||||
/** | /** | ||||
* Light-weight threading utilities. | * Light-weight threading utilities. | ||||
* Implemented in Threading.cpp. | * Implemented in Threading.cpp. | ||||
* Split from Threading because this is included (via profilers) in most files. | * Split from Threading because this is included (via profilers) in most files. | ||||
*/ | */ | ||||
namespace Threading | namespace Threading | ||||
{ | { | ||||
Stan: Capital F ? | |||||
/** | /** | ||||
* Returns whether the current thread is the 'main' thread | * Returns whether the current thread is the 'main' thread | ||||
Not Done Inline ActionsSeparate file ? Stan: Separate file ? | |||||
Done Inline ActionsI think ThreadUtil needs a complete refactoring (it redefines std::mutex, basically) and I'll do it then I suppose. wraitii: I think ThreadUtil needs a complete refactoring (it redefines std::mutex, basically) and I'll… | |||||
* (i.e. matches an earlier call to SetMainThread). | * (i.e. matches an earlier call to SetMainThread). | ||||
*/ | */ | ||||
bool IsMainThread(); | bool IsMainThread(); | ||||
/** | /** | ||||
* Set the current thread as the 'main' thread. | * Set the current thread as the 'main' thread. | ||||
* (This is called during engine initialisation.) | * (This is called during engine initialisation.) | ||||
*/ | */ | ||||
void SetMainThread(); | void SetMainThread(); | ||||
/** | |||||
* Returns the number of threads we want for the pathfinder. | |||||
*/ | |||||
u32 GetNumberOfPathfindingThreads(); | |||||
} | } | ||||
#endif // INCLUDED_THREADUTIL | #endif // INCLUDED_THREADUTIL |
Wildfire Games · Phabricator
Capital F ?