Go to the documentation of this file.
1 // Copyright 2020 Autodesk, Inc. All rights reserved.
2 //
3 // Use of this software is subject to the terms of the Autodesk license
4 // agreement provided at the time of installation or download, or which
5 // otherwise accompanies this software in either electronic or hard copy form.
12 #pragma once
13 #include "ai_api.h"
22 AI_API void* AiThreadCreate(unsigned int (*fn)(void*), void* data, int priority);
23 AI_API void AiThreadClose(void* thread);
24 AI_API void AiThreadWait(void* thread);
25 AI_API AI_CONST void* AiThreadSelf();
27 #define AI_MAX_THREADS 256
32 #define AI_PRIORITY_LOWEST 0x00
33 #define AI_PRIORITY_LOW 0x01
34 #define AI_PRIORITY_NORMAL 0x02
35 #define AI_PRIORITY_HIGH 0x03
36 /*\}*/
38 /*\}*/
AI_API void * AiThreadCreate(unsigned int(*fn)(void *), void *data, int priority)
Creates a thread and returns a handler for the thread.
DLL export prefix for API functions (necessary for multi-platform development)
AI_API void AiThreadClose(void *thread)
Closes thread handle, to avoid resource leaks.
AI_API void AiThreadWait(void *thread)
Wait for a thread to finish.
AI_API AI_CONST void * AiThreadSelf()
Returns a handle for the current (calling) thread.

© 2020 Autodesk, Inc. · All rights reserved ·