|Re: Creating concrete model using threading [message #686639 is a reply to message #677129]
||Wed, 22 June 2011 16:26
| Ed Willink
Registered: July 2009
In response to your disjoint queries, by warming up, I mean executing
all the code once so that all caches are populated. As I wrote
You probably need to do an EPackage content traversal to perform a
practice eGet and eInvoke for everything with a delegate EAnnotation.
On 07/06/2011 17:18, Ed Willink wrote:
> We discussed this in an earlier thread and suspected that delegates
> would not be threadsafe. I'm afraid you've just confirmed it.
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=348606 raised.
> You can probably avoid the problem by warming the delegates up in
> single-threaded before launching the others. I would recommend
> creating all Resource classes from a single thread too if the
> ResourceSet is shared.
> You probably need to do an EPackage content traversal to perform a
> practice eGet and eInvoke for everything with a delegate EAnnotation.
> This could be a generally useful routine, that would be worth making
> available to others, until it perhaps becomes redundant in Juno if the
> bug is fixed. But even then it might be good to be able to warm up
> Ed Willink
> On 07/06/2011 11:39, email@example.com wrote:
>> I have ecore model and i want to create 1000 XMI models using threading.
>> I am using
>> new OCLInvocationDelegateFactory.Global());
>> new OCLSettingDelegateFactory.Global());
>> When i create 1000 model in one thread then every thing works fine
>> and it calculates every derived property but when i use multiple
>> threads for less execution time it gives exception in delegation and
>> says concurrent access.
>> Is the delegation being used is thread safe?
>> what is right procedure to make it work in multi threaded environment?.
>> Please help me
Powered by FUDForum
. Page generated in 0.02259 seconds