getThreadNum
import { getThreadNum } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
ARGUMENTSSee signature below
FUNCTIONgetThreadNum
RETURN TYPEnumber
Returns the index of the currently executed thread within the current parallel region. Always returns 0 if called outside of parallel region.
deprecated: Current implementation doesn't corresponding to this documentation.
The exact meaning of the return value depends on the threading framework used by OpenCV library:
TBB- Unsupported with current 4.1 TBB release. Maybe will be supported in future.OpenMP- The thread number, within the current team, of the calling thread.Concurrency- An ID for the virtual processor that the current context is executing on (0 for master thread and unique number for others, but not necessary 1,2,3,...).GCD- System calling thread's ID. Never returns 0 inside parallel region.C=- The index of the current parallel task. See: setNumThreads, getNumThreads
getThreadNum(): number;Returns
The number result.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.