Multithreading using a listdlg() for a decision request
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I want to make a very small parallel computing and I m new to this, dont know how to start
I display a listdgl() that will show me a list of options that I have to choose. What I want is to measure the time since the dialogbox window was opened and choose automatically the first option after 10 min in case the user is away from computer and didnt choose any option.
So I will need a thread to open the listdlg and another thread to start the timer.
At some point, if timer > 600(seconds) -> choose first option and close listdlg
I was reading about parfor, but to my understanding, the parallel functions inside parfor need to be similar, so it didnt quite help.
The question is how to make something like this? Any tips will help
Hope I was clear. Thanks :)
0 comentarios
Respuestas (1)
Abhimenyu
el 25 de Sept. de 2023
Hi Claudia,
I understand that you want to use the MATLAB parallel computing toolbox for coding your problem.
I would suggest the use of a simple timer function to execute the task. It can give you similar results without multithreading.
The spmd function in the MATLAB parallel computing toolbox can be used to run two parallel and independent pool processes. However, in this case, the dialog box is a visible GUI process that only runs on the main thread. Hence the timer function is the best alternative.
Thank you,
Abhimenyu.
0 comentarios
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!