Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Can I declare an advice as synchronized

Hi.


>     I'm using aspect in an concurrent application and I'd like to be
> sure that the advices are synchronized. In fact I don't want that more
> than one thread per time runs the advice code. Can I acchieve this
> result? I read that an aspect is a singleton on the aspectJ guide,
does
> it imply that only one thread per time is inside it?

No, that is not implied (as it is not for any other regular singleton).
But you can just use the synchronized keyword for your advice AFAIK.

Eric

--
Eric Bodden
Sable Research Group, McGill University
Montreal, Canada





Back to the top