getCurrentWorker - Get worker object from current worker - MATLAB (original) (raw)
Main Content
Get worker object from current worker
Syntax
Description
[w](#mw%5F8d280e7f-2d86-40ef-b780-9161ca5db065) = getCurrentWorker
returns the current worker, as a parallel.Worker object. UsegetCurrentWorker
to get information from the worker during a computation, such as the worker host name.
If getCurrentWorker
is evaluated on a worker,w
is a parallel.Worker
object. Otherwise,w
is an empty double.
Examples
Use the Host
property to find the host name of the current worker.
On a worker, use getCurrentWorker
to get the current worker object w
.
Then, use the Host
property to get the host name of the worker.
Output Arguments
Worker object, specified as a parallel.Worker
or empty double. When you use getCurrentWorker
on a worker, w
is theparallel.Worker
object that the current worker is associated with. When you use getCurrentWorker
on the client, w
is an empty double.
Data Types: parallel.Worker
Version History
Introduced before R2006a