You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Karl Heinz Marbaise <kh...@gmx.de> on 2014/11/10 09:24:53 UTC

@Mojo( threadsafe = true, false)

Hi,

based on a discussion i would like to know the following:

If a mojo is marked as threadsafe = true mean that two instances of the 
mojo could be created and ran in parallel...if threadsafe = false this 
will not happen so they will always run sequentiel...?

Is my assumption correct ? I assume calling mvn -T 3 etc.

Kind regards
Karl Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: @Mojo( threadsafe = true, false)

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi Kristian,

On 11/10/14 9:27 PM, Kristian Rosenvold wrote:
> No. Threadsafe annotation does not affect execution. It only affects nagging :)
Absolutely true... ;-)

>
> But it's actually a quite good idea; we could probably synchronize
> execution inside core for non-threadsafe mojos.
>
> (Synchronizing inside the actual mojo is only moderately reliable...)

So this means annotating a mojo with threadsafe = false doesn't really 
mean it would be executed in parallel...;-(...

It's not what i expected...


>
> Kristian
>
> 2014-11-10 9:24 GMT+01:00 Karl Heinz Marbaise <kh...@gmx.de>:
>> Hi,
>>
>> based on a discussion i would like to know the following:
>>
>> If a mojo is marked as threadsafe = true mean that two instances of the mojo
>> could be created and ran in parallel...if threadsafe = false this will not
>> happen so they will always run sequentiel...?
>>
>> Is my assumption correct ? I assume calling mvn -T 3 etc.
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: @Mojo( threadsafe = true, false)

Posted by Kristian Rosenvold <kr...@gmail.com>.
No. Threadsafe annotation does not affect execution. It only affects nagging :)

But it's actually a quite good idea; we could probably synchronize
execution inside core for non-threadsafe mojos.

(Synchronizing inside the actual mojo is only moderately reliable...)

Kristian

2014-11-10 9:24 GMT+01:00 Karl Heinz Marbaise <kh...@gmx.de>:
> Hi,
>
> based on a discussion i would like to know the following:
>
> If a mojo is marked as threadsafe = true mean that two instances of the mojo
> could be created and ran in parallel...if threadsafe = false this will not
> happen so they will always run sequentiel...?
>
> Is my assumption correct ? I assume calling mvn -T 3 etc.
>
> Kind regards
> Karl Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org