Search
Preparing search index...
The search index is not available
node-threadpool
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
FixedThreadPool
FixedThreadPool
Class FixedThreadPool
Hierarchy
FixedThreadPool
Implements
IThreadPool
Index
Constructors
constructor
Properties
free
Workers
num
Threads
queue
worker
Options
Methods
execute
Next
submit
Constructors
constructor
new
Fixed
Thread
Pool
(
numThreads
:
number
, workerOptions
?:
WorkerOptions
)
:
FixedThreadPool
Parameters
numThreads:
number
Default value
workerOptions:
WorkerOptions
= {}
Returns
FixedThreadPool
Properties
Private
free
Workers
free
Workers
:
Worker
[]
= []
Private
num
Threads
num
Threads
:
number
Private
queue
queue
:
Array
<
ISubmittedThread
<
any
,
any
>
>
= []
Private
worker
Options
worker
Options
:
WorkerOptions
Methods
Private
execute
Next
execute
Next
(
)
:
any
Returns
any
submit
submit<T, D>
(
fn
:
Runnable
<
T
,
D
>
, data
?:
D
)
:
Promise
<
T
>
Type parameters
T
D
Parameters
fn:
Runnable
<
T
,
D
>
Optional
data:
D
Returns
Promise
<
T
>
Globals
"thread-
pool/thread-
worker"
Executors
Fixed
Thread
Pool
Thread
Pool
Fixed
Thread
Pool
constructor
free
Workers
num
Threads
queue
worker
Options
execute
Next
submit
Generated using
TypeDoc