I'm hooked into the win32 low level mouse hook events and I would like to make that mouse click proc a 开发者_JAVA技巧higher thread priority so I can process mouse events while the UI thread is busy. Is this possible?
If you have a long running process this should be run on its own thread independent of the UI thread. This should take care of your problem and restore the UIs responsiveness
Also, I think you're confusing terms, Threads are independent execution paths (a sort of sub process) bound to a main process (your running application). Clicks generate events which occur on the UI thread and are queued in the order they occurred. As far as I know, this order can not be changed (at least not easily).
You can also implement async await to prevent background work from blocking the ui logic execution.
精彩评论