Do MATLAB GUI buttons create parallel strands if pressed multiple times?
1 回表示 (過去 30 日間)
古いコメントを表示
So i have a GUI with a button to gather data from a USB device. when pressed the button triggers a sequential code to recover data from the device.
My question is, could multiple presses trigger multiple instances of the same code to run either deliberately or through the absence of a particular code to prevent it?
If so, and it affects the displayed figure, which process has priority?
Thanks,
Jason
0 件のコメント
回答 (2 件)
Walter Roberson
2017 年 9 月 18 日
You would need to have specific use of the Parallel Computing Toolbox such as parfor() or spmd() or parfeval() in order to have multiple parallel instances of the same code.
However in some cases it is possible for a callback to suspend a different callback. See the description of https://www.mathworks.com/help/matlab/ref/uicontrol-properties.html#zmw57dd0e1042342 the Interruptible and BusyAction properties.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!