MATLAB Help Center
Get worker object from current worker
w = getCurrentWorker
w = getCurrentWorker returns the current worker, as a parallel.Worker object. Use getCurrentWorker to get information from the worker during a computation, such as the worker host name.
w
parallel.Worker
getCurrentWorker
If getCurrentWorker is evaluated on a worker, w is a parallel.Worker object. Otherwise, w is an empty double.
example
collapse all
Use the Host property to find the host name of the current worker.
Host
On a worker, use getCurrentWorker to get the current worker object w.
w = getCurrentWorker;
Then, use the Host property to get the host name of the worker.
host = w.Host;
[]
Worker object, specified as a parallel.Worker or empty double. When you use getCurrentWorker on a worker, w is the parallel.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
Introduced before R2006a
getAttachedFilesFolder | getCurrentCluster | getCurrentJob | getCurrentTask
getAttachedFilesFolder
getCurrentCluster
getCurrentJob
getCurrentTask
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
Europa
Asia-Pacifico
Contatta l’ufficio locale