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

Well, I tryed to use the synchronized keyword writing:
   synchronized before ....
but I have a compile error which says:
   illegal modifier on advice, only strictfp allowed
For this reason I'm looking for another solution if it exists. Do you have any idea?

bye
lollo82

----- Original Message ----- From: "Eric Bodden" <eric.bodden@xxxxxxxxxxxxxx>
To: <aspectj-users@xxxxxxxxxxx>
Sent: Wednesday, July 19, 2006 10:09 PM
Subject: 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



_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users




Back to the top