of


Description:

public static Result<ThreadPool,Error> of (int poolSize)

Creates a fixed-size thread pool.

Parameters:

poolSize

number of worker threads (must be > 0).

Returns:

Result.ok(pool), or Result.error(ThreadPoolError.INVALID_ARGUMENT) when poolSize is not positive.