Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Is Xpand thread safe(Is Xpand thread safe)
Is Xpand thread safe [message #517900] Tue, 02 March 2010 08:37 Go to next message
zakir Hussain is currently offline zakir Hussain
Messages: 76
Registered: July 2009
Member
Hello All,

I am trying to invoke XpandTemplates in different threads, could you please suggest me whether Xpand is thread safe.

Each XpandTemplate is invoked using XpandFacade.

Re: Is Xpand thread safe [message #518109 is a reply to message #517900] Wed, 03 March 2010 00:38 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven Efftinge
Messages: 1667
Registered: July 2009
Senior Member
zakir Hussain schrieb:
> Hello All,
>
> I am trying to invoke XpandTemplates in different threads, could you
> please suggest me whether Xpand is thread safe.

No it is not.

Cheers,
Sven


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: Is Xpand thread safe [message #518152 is a reply to message #518109] Wed, 03 March 2010 04:53 Go to previous messageGo to next message
zakir Hussain is currently offline zakir Hussain
Messages: 76
Registered: July 2009
Member
Hello Sven,

Thank you very much for the reply.....

in my case for each thread i am using an XpandFacade to invoke definition of an Xpand template, so in each thread .xpt and .ext will be parsed and loaded in memory for a particular XpandExecutionContext.

Could you please let me know which classes or which modules in Xpand are not thread safe...

Thanks in Advance!!
Re: Is Xpand thread safe [message #518458 is a reply to message #518152] Wed, 03 March 2010 21:46 Go to previous message
Sven Efftinge is currently offline Sven Efftinge
Messages: 1667
Registered: July 2009
Senior Member
I'ld say nothing is thread safe.
But at the same time we don't have any global state (besides the EMF
registries) so if you create separate facades with separate execution
contexts and you make sure that you don't modify the state both engines
are wokring on (i.e. the model) or create clones before so, you should
be fine.

Sven

zakir Hussain schrieb:
> Hello Sven,
>
> Thank you very much for the reply.....
>
> in my case for each thread i am using an XpandFacade to invoke
> definition of an Xpand template, so in each thread .xpt and .ext will be
> parsed and loaded in memory for a particular XpandExecutionContext.
>
> Could you please let me know which classes or which modules in Xpand are
> not thread safe...
>
> Thanks in Advance!!


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Previous Topic:Re: Using Jet with recursive data structures
Next Topic:How to run xpand (or a workflow) from the command line?
Goto Forum:
  


Current Time: Thu May 23 10:40:11 EDT 2013

Powered by FUDForum. Page generated in 0.01596 seconds