Changeset View
Changeset View
Standalone View
Standalone View
source/ps/ThreadUtil.h
Show All 14 Lines | |||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#ifndef INCLUDED_THREADUTIL | #ifndef INCLUDED_THREADUTIL | ||||
#define INCLUDED_THREADUTIL | #define INCLUDED_THREADUTIL | ||||
namespace ThreadUtil | namespace ThreadUtil | ||||
{ | { | ||||
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 ?