Parallel pool of thread workers on the local machine
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.
Create a parallel pool of thread workers on the local machine by using the parpool
function.
pool = parpool("threads")
delete | Shut down parallel pool |
parfeval | Execute function asynchronously on parallel pool worker |
parfevalOnAll | Execute function asynchronously on all workers in parallel pool |
For compatibility with process workers, the following object functions are also supported. You do not need to use them because data and file transfer is not necessary for pools of thread workers.
addAttachedFiles | Attach files or folders to parallel pool |
listAutoAttachedFiles | List of files automatically attached to job, task, or parallel pool |
ticBytes | Start counting bytes transferred within parallel pool |
tocBytes | Read how many bytes have been transferred since calling ticBytes |
updateAttachedFiles | Update attached files or folders on parallel pool |