Main Content

ThreadPool

Parallel pool of thread workers on the local machine

Description

Use parpool to create a parallel pool of thread workers on your local machine. After you create the pool, parallel pool features, such as parfor or parfeval, run on the workers. With the ThreadPool object, you can interact with the parallel pool.

Creation

Create a parallel pool of thread workers on the local machine by using the parpool function.

pool = parpool("threads")

Properties

expand all

This property is read-only.

Number of thread workers comprising the parallel pool, specified as an integer.

Object Functions

deleteShut down parallel pool
parfevalRun function on parallel pool worker
parfevalOnAllExecute function asynchronously on all workers in parallel pool
Introduced in R2020a