3ds Max C++ API Reference
|
The functions in this namespace are provided to assist in debugging operations performed on a worker thread. More...
Classes | |
class | WorkerThreadSet |
A class to help control the setting of the worker thread. More... | |
Functions | |
UtilExport bool | IsInMainThread () |
Returns true if in main thread. | |
UtilExport void | SetWorkerThread (DWORD threadID=(DWORD) -1) |
Sets the worker thread id to use for testing in IsExclusivelyInMainOrWorkerThread function. | |
UtilExport DWORD | GetWorkerThread () |
Returns the worker thread id set via SetWorkerThread. | |
UtilExport void | ClearWorkerThread () |
Clears the worker thread id value. | |
UtilExport bool | IsExclusivelyInMainOrWorkerThread () |
Returns true if (a) the worker thread id is not set and in main thread, or (b) the worker thread id is set and in that thread. | |
UtilExport void | Disable () |
Disables checking. | |
The functions in this namespace are provided to assist in debugging operations performed on a worker thread.
Many operations in 3ds Max should normally always be performed in the main thread. This includes operations such as creating or deleting Animatable-derived objects and Hold system operations. In some controlled cases, these operations can be performed in worker threads, but in these cases these operations can only be performed in a single worker thread. For example, an importer may display a modal dialog with a progress bar in the main thread and perform the import in a worker thread.
UtilExport bool IsInMainThread | ( | ) |
Returns true if in main thread.
UtilExport void SetWorkerThread | ( | DWORD | threadID = (DWORD) -1 | ) |
Sets the worker thread id to use for testing in IsExclusivelyInMainOrWorkerThread function.
threadID | - The worker thread id. If a threadID value of -1 is used, the worker thread id is set to the current thread id |
UtilExport DWORD GetWorkerThread | ( | ) |
Returns the worker thread id set via SetWorkerThread.
If no worker thread is set, the returned value is 0.
UtilExport void ClearWorkerThread | ( | ) |
Clears the worker thread id value.
UtilExport bool IsExclusivelyInMainOrWorkerThread | ( | ) |
Returns true if (a) the worker thread id is not set and in main thread, or (b) the worker thread id is set and in that thread.
UtilExport void Disable | ( | ) |
Disables checking.