How to stop a sub function after certain time from main function ?
조회 수: 3(최근 30일)
표시 이전 댓글
I want to stop a sub function of my main function after a certain time and want to get the other sub function result at the same time ,How to do it ?
답변(1개)
Walter Roberson
2022년 5월 11일
If you use parfeval() then you can cancel() the future.
However when you cancel a future you do not have access to its workspace. You cannot use this method to get "best results so far" from the worker.
If you create Parallel Data Queues then you can use them to send requests some kinds of workers. But this approach requires cooperation with the worker.
댓글 수: 0
참고 항목
범주
Find more on Entering Commands in Help Center and File Exchange
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!