public final class Threading extends Object
The IlmImf library uses threads to perform reading and writing of OpenEXR files in parallel. The thread that calls the library always performs the actual file IO (this is usually the main application thread) whereas several worker threads perform data compression and decompression. The number of worker threads can be any non-negative value (a value of zero reverts to single-threaded operation). As long as there is at least one worker thread, file IO and compression can potentially be done concurrently through pinelining. If there are two or more worker threads, then pipelining as well as concurrent compression of multiple blocks can be performed.
Threading in the Imf library is controllable at two granularities:
Modifier and Type | Method and Description |
---|---|
static int |
globalThreadCount()
Return the number of global worker threads used for parallel
compression and decompression of OpenEXR files.
|
static void |
setGlobalThreadCount(int count)
Change the number of global worker threads to
count , a value
greater than or equal to 0. |
public static int globalThreadCount()
public static void setGlobalThreadCount(int count)
count
, a value
greater than or equal to 0.count
- the new number of global worker threads