Centro de ayuda de MATLAB
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.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
Europa
Asia-Pacífico
Comuníquese con su oficina local