필터 지우기
필터 지우기

Concurrent programming. GUI Multithread and timer multithread

조회 수: 9 (최근 30일)
Mario Rubio Gómez
Mario Rubio Gómez 2015년 6월 26일
답변: Walter Roberson 2015년 6월 26일
Hello there.
I have some questions about multithreading. I am doing a project based on Maltlab GUI, using many functions, global variables and two timers. The thing is I call different functions inside others and I want them to execute concurrently. The same thing happens with the timer, I want it to work alone in a thread so the programm can continue doing the statements and even calling another function to be executed in other thread.
I do not know if this is possible on Matlab, I have looked up a little about the parallel toolbox but I dont know if using some of these functions will work the way I am trying to do the GUI.
Any help will be gratefully accepted.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 6월 26일
There is a fundamental limitation that all graphics operations must be done in the same Java thread, so graphics callbacks effectively get single-threaded (or at least did in the past). Graphics operations cannot be distributed through the Parallel Computing Toolbox
My understanding is that for any one worker, timers are also single threaded, but I gather that different workers can have different timers. Also, timers can interrupt graphics callbacks.
spmd with its message passing might possibly be the best concurrent model for you to investigate.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by