Contenu principal

Traitement en arrière-plan et parallèle

Exécuter du code en arrière-plan ou à un moment précis

MATLAB® inclut des fonctionnalités permettant de régler des timers pour l’exécution des programmes et d’exécuter le code en arrière-plan.

Fonctions

développer tout

timerSchedule execution of MATLAB commands
deleteDelete files or objects
isvalidDetermine valid handles
startStart timer
startatSchedule timer to fire at specified time
stopStop timer
timerfindFind timer objects
timerfindallFind all timer objects
waitBlock command prompt until timer stops running

Exécution en arrière-plan

parfevalRun function in background (depuis R2021b)
parfevalOnAllRun function on all workers in background
backgroundPoolEnvironment for running code in the background (depuis R2021b)

Objets Future

fetchOutputsRetrieve results from function running in the background
afterEachRun function after each function finishes running in the background
afterAllRun function after all functions finish running in the background
cancelStop function running in the background
cancelAllStop all functions running in the background (depuis R2022a)
waitWait for futures to complete
fetchNextRetrieve next unread outputs from Future array
FutureFunction scheduled to run

Files d’attente de données

sendSend data to DataQueue or PollableDataQueue
pollRetrieve data from PollableDataQueue
closeClose pollable data queue (depuis R2025a)
afterEachRun function after data is received on DataQueue
parallel.pool.DataQueueSend and automatically process data
parallel.pool.PollableDataQueueSend and manually retrieve data
parallel.pool.ConstantCopy or create data only once on workers in parallel pool (depuis R2021b)