Interrupt Callback Execution
- If the running callback contains one of these commands, then MATLAB stops the
execution of the running callback and executes the interrupting callback. MATLAB
resumes executing the running callback when the interrupting callback completes. - If the running callback does not contain one of these commands, then MATLAB
finishes executing the callback without interruption.
For more details about the interruptible property and its effects, see the Interruptible
property description on the Uicontrol Properties page.
Example
This example shows how to control callback interruption using the Interruptible and
BusyAction properties.
Copy the Source File
1 In MATLAB, set your current folder to one in which you have write access.
2 Execute this MATLAB command:
copyfile(fullfile(docroot,
'techdoc','creating_guis','examples',...
'callback_interrupt.m')),fileattrib('callback_interrupt.m',
'+w');
Run the Example Code
Execute the command, callback_interrupt. The program displays two windows.