|Re: Multiple XMI Resources concurrently [message #835078 is a reply to message #835054]
||Mon, 02 April 2012 19:16
| Ed Merks
Registered: July 2009
On 02/04/2012 11:36 AM, Ed Willink wrote:
> EMF claims to be threadsafe, and with the possible exception of
> delegates, probably is.
What's the issue with setting delegates? I can see a race condition in
their initialization (EStructuralFeatureImpl.getSettingDelegate), but it
shouldn't matter if the delegate is initialized more than once...
> Eclipse OCL makes no such claims and clearly isn't.
> If you want to operate beyond the claimed capabilities, it is for you
> to debug your problems, some of which may be yours rather than Eclipse
> I gave you a possible warm up procedure that just might work. It does
> all the dangerous things in one thread, then does only safe things in
> other threads. This strategy might avoid the problems. With knowledge
> of your application you may be able to apply other strategies.
> But if you really want multi-threading, you may want to fix the thread
> safety and contribute a patch so that others can benefit.
> Ed Willink
> On 02/04/2012 14:11, ModelGeek Mising name wrote:
>> but can i create multiple XMI resources with multithreading like
>> URI uri = URI.createFileURI(number + "temp.xmi");
>> ResourceSet resourceSet = new ResourceSetImpl();
>> new XMIResourceFactoryImpl());
>> Resource resource = resourceSet.createResource(uri);
>> this piece of code is defined in thread's run method but in some
>> thread i get the NPE
>> on last line means resource object is null in some cases. Is it also
>> known problem or i am doing something wrong?
>> Thanks alot for assitance
Powered by FUDForum
. Page generated in 0.05053 seconds