# setThreadCount method

void setThreadCount(

1. int threadCount

)

Sets the number of threads to be used for face detection. Hint: Default value is 1. Allocating more than one thread can increase the speed of the process.

param threadCount Number of threads to be used for face detection. throws FaceException An error has occurred during Face Library execution.

## Implementation

    void setThreadCount(int threadCount) {
      var err = faceSDK.id3FaceDetector_SetThreadCount(_pHandle.value, threadCount);
      if (err != FaceError.success.value) {
        throw FaceException(err);
      }
    }