This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Run things on main thread | ||
---|---|---|---|
Product: | platform | Reporter: | SirIntellegence |
Component: | -- Other -- | Assignee: | Jaroslav Tulach <jtulach> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | anebuzelsky |
Priority: | P3 | ||
Version: | 7.3.1 | ||
Hardware: | Macintosh | ||
OS: | Mac OS X | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: |
Suggested main thread invoke code
Suggested main thread invoke code V2 Suggested main thread invoke code V3 Suggested main thread invoke code V4 Suggested main thread invoke code V5 |
Description
SirIntellegence
2013-08-19 21:54:54 UTC
Jarda, what is your take on this question? Why not, but you need to show us the code. Attach your suggested patch and reopen. Created attachment 141117 [details]
Suggested main thread invoke code
I was thinking of something like this, adding MainThreadRunner.runDeamon() to the end of MainImpl.main
Would that work?
I would test it, but I don't know where the host project is to build Netbeans XD
Created attachment 141118 [details]
Suggested main thread invoke code V2
This one might be safer without the nested synchronized blocks
Created attachment 141119 [details]
Suggested main thread invoke code V3
This one handles InvokeAndWait exeptions better
Created attachment 141282 [details]
Suggested main thread invoke code V4
Fixed the logical impossibility of actually doing an invoke operation due to not notifying the main thread....
Created attachment 141286 [details]
Suggested main thread invoke code V5
Then add a dependency on Bootstrap for Execution API, and append this to the ManImpl.main(String[]) method:
ThreadRunner.runDeamon(ThreadRunner.getDefault());
I have noticed that it doesn't like being in Execution API, so I put it in lookup, and that seems to work Version five does not look like a diff that could be applied. Closing. |