Find Display in SWTUtils [message #1765874] |
Wed, 14 June 2017 02:54  |
Eclipse User |
|
|
|
Hello,
we have some problems finding the SWT display via method "waitForDisplayToAppear" of the SWTUtils class in our application. After some debugging we have seen that all primary threads are gathered to find the display with the right thread. But in method "allThreads()" can only be found a maximum of 64 threads while apparently we could have more than 80 threads in our final application. So sometimes it could be that the proper thread for the SWT display is not in the thread array which causes a "display not found" exception after the chosen waiting time.
public static Thread[] allThreads() {
ThreadGroup threadGroup = primaryThreadGroup();
Thread[] threads = new Thread[64];
int enumerate = threadGroup.enumerate(threads, true);
Thread[] result = new Thread[enumerate];
System.arraycopy(threads, 0, result, 0, enumerate);
return result;
}
Here are some information about the environment on which the application is tested:
OS: MS Windows Server 2008
System type: x64
Processor: Intel Xeon, 4 cores
Is it possible to enhance the maximum number of elements for the thread array? Maybe there is also another option to solve this problem that we have not seen yet.
Thanks in advance for your support.
Best regards,
Michael
|
|
|
|
Powered by
FUDForum. Page generated in 0.03137 seconds