ai_threads.h
Go to the documentation of this file.
1// Copyright 2021 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.
6
12#pragma once
13#include "ai_api.h"
14
22AI_API void* AiThreadCreate(unsigned int (*fn)(void*), void* data, int priority);
23AI_API void AiThreadClose(void* thread);
24AI_API void AiThreadWait(void* thread);
25AI_API AI_CONST void* AiThreadSelf();
26
27#define AI_MAX_THREADS 1024
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/*\}*/
37
38/*\}*/
DLL export prefix for API functions (necessary for multi-platform development)
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.
AI_API void * AiThreadCreate(unsigned int(*fn)(void *), void *data, int priority)
Creates a thread and returns a handler for the thread.
AI_API void AiThreadClose(void *thread)
Closes thread handle, to avoid resource leaks.

© 2022 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com