cancelAll
Syntax
Description
cancelAll(
stops all queued or
running elements of the background pool.p.FevalQueue
)
Examples
Stop All Functions Running in Background
Create a background pool. Use parfeval
to run pause(Inf)
without retrieving any outputs.
pool = backgroundPool; f = parfeval(pool,@pause,0,Inf);
Check the status of functions queued and running in the pool.
pool.FevalQueue
ans = FevalQueue with properties: QueuedFutures: [1x1 parallel.FevalFuture] RunningFutures: [0x0 parallel.FevalFuture]
Use cancelAll
to stop all Futures
in FevalQueue
.
cancelAll(pool.FevalQueue) pool.FevalQueue
ans = FevalQueue with properties: QueuedFutures: [0x0 parallel.FevalFuture] RunningFutures: [0x0 parallel.FevalFuture]
Input Arguments
p.FevalQueue
— Queue of FevalFuture
objects to run on the background pool
FevalFuture
scalar | FevalFuture
array
Queue of FevalFuture
objects to run on the background pool,
specified as an FevalFuture
scalar and FevalFuture
array.
Version History
Introduced in R2022a
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)