|ModalContext.setAllowReadAndDispatch does not work correct as comment [message #1805769]
||Tue, 23 April 2019 12:04
| Daryl Qiu
Registered: April 2019
Currentlly, I am executing a job in the UI thread that takes a long time, but I don't what it to hand the UI.
So I use the ModalComtext.run(...) method to put the job into a non-UI thread, then I can click on the UI interface during the execution of this job.But I got exections that the widget is disposed.
I found out that this is because display.readAndDispatch is called in the method ModalComtextThread.block() to respond to the UI event. Then I use ModalContext.setAllowReadAndDispatch(false) first.
But the strange thing is that the job is now running in the UI thread, it will hang up the UI, this is not the result I expected. What should I do?
[Updated on: Wed, 24 April 2019 05:25]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01305 seconds