Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322495 - Support of multiple threadings
Summary: Support of multiple threadings
Status: CLOSED FIXED
Alias: None
Product: XWT
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-12 05:39 EDT by Yves YANG CLA
Modified: 2013-01-24 15:31 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yves YANG CLA 2010-08-12 05:39:15 EDT
During the Spring integration, Angelo has reported a problem of multiple threadings in XWT (Bug 320405). The following code raises an exception: 

org.eclipse.swt.SWTException: Invalid thread access
    at org.eclipse.swt.SWT.error(SWT.java:4083)

public static void main(String[] args) {

        new Thread() {
            @Override
            public void run() {

                URL url = CLRFactoryNamespace.class
                        .getResource(CLRFactoryNamespace.class.getSimpleName()
                                + IConstants.XWT_EXTENSION_SUFFIX);
                try {
                    XWT.open(url);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }.start();

        new Thread() {
            @Override
            public void run() {

                URL url = CLRFactoryNamespace.class
                        .getResource(CLRFactoryNamespace.class.getSimpleName()
                                + IConstants.XWT_EXTENSION_SUFFIX);
                try {
                    XWT.open(url);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }.start();
    }
Comment 1 Yves YANG CLA 2010-08-12 06:37:49 EDT
The modification is committed with a testcase -> 20100812