pub type JxlParallelRunInit = unsafe extern "C-unwind" fn(*mut c_void, usize) -> i32;Expand description
Parallel run initialization callback. See JxlParallelRunner for details.
This function MUST be called by the JxlParallelRunner only once, on the
same thread that called JxlParallelRunner, before any parallel
execution. The purpose of this call is to provide the maximum number of
threads that the JxlParallelRunner will use, which can be used by JPEG XL
to allocate per-thread storage if needed.
§Parameters
jpegxl_opaque: thejpegxl_opaquehandle provided toJxlParallelRunnermust be passed here.num_threads: the maximum number of threads. This value must be positive.
§Returns
0if the initialization process was successful.- An error code if there was an error, which should be returned by
JxlParallelRunner.