Main Content

ThreadPool

Parallel pool of thread workers on the local machine

Description

Useparpoolto create a parallel pool of thread workers on your local machine. After you create the pool, parallel pool features, such asparfororparfeval, run on the workers. With theThreadPoolobject, you can interact with the parallel pool.

Creation

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

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

delete Shut down parallel pool
parfeval Run function on parallel pool worker
parfevalOnAll Execute function asynchronously on all workers in parallel pool
介绍了R2020a