getThreadCount method

int getThreadCount()

Gets the number of threads to use for reading. Hint: Default value is 1. Allocating more than 1 thread here can increase the speed of the process.

return Number of threads to use for reading. throws DocumentException An error has occurred during Document Library execution.

Implementation

int getThreadCount() {
  Pointer<Int> pThreadCount = calloc();
  try {
    var err = documentSDK.id3DocumentMrzReader_GetThreadCount(_pHandle.value, pThreadCount);
    if (err != DocumentError.success.value) {
      throw DocumentException(err);
    }
    final vThreadCount = pThreadCount.value;
    return vThreadCount;
  } finally {
    calloc.free(pThreadCount);
  }
}