Main Content

delete

Shut down parallel pool

Description

delete(poolobj) shuts down the parallel pool associated with the object poolobj, and destroys the communicating job that comprises the pool. Subsequent parallel language features will automatically start a new parallel pool, unless your parallel preferences disable this behavior.

References to the deleted pool object become invalid. Invalid objects should be removed from the workspace with the clear command. If multiple references to an object exist in the workspace, deleting one reference to that object invalidates the remaining references to it. These remaining references should be cleared from the workspace with the clear command.

example

Examples

collapse all

To get the current parallel pool, use the gcp function.

poolobj = gcp('nocreate');

Shut down the current pool by using the delete function.

delete(poolobj);

Input Arguments

collapse all

Parallel pool to shut down, specified as a parallel.Pool object. You can get the current parallel pool with the gcp function.

Example: delete(gcp('nocreate'))

Data Types: parallel.Pool

Version History

Introduced in R2013b

See Also

|