Run code in the background and run other code at the same time
When you run code in MATLAB®, you must wait for that code to finish running before you can run other code. The background pool enables you to run code in the background and run other code at the same time. For instance, you can create apps that remain responsive while performing calculations in the background.
parfeval with the background pool to run a function in the background.
parfeval immediately returns a
Future object that represents the function running in the background. To get results from the
|Retrieve results from function running in the background|
|Run function after each function finishes running in the background|
|Run function after all functions finish running in the background|
|Stop function running in the background|
|Stop all functions running in the background|
|Wait for futures to complete|
|Retrieve next unread outputs from |
|Function scheduled to run|
|Send data to |
|Retrieve data from |
|Run function after data is received on |
|Send and automatically process data|
|Send and manually retrieve data|
Get Started with Background Processing
- Asynchronous Functions
Learn about how to run code in the background in MATLAB.
- Run Functions in Background
backgroundPoolto run functions in the background.
- Run MATLAB Functions in Thread-Based Environment
Check support for MATLAB functions that you want to run in the background.
- Update Wait Bar While Functions Run in the Background
afterEachto update a wait bar while you run functions in the background.
- Create Responsive Apps by Running Calculations in the Background
Improve the responsiveness of apps you create with MATLAB App Designer by using the background pool.