[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] advice matching the synchronized method shadow ... will be executed outside the lock rather than inside (compiler limitation)
|
But my question was why the transformation is done at all.
In my understanding, execution(synchronized *.*(..)) matches all synchronized methods, i.e. shadows should be woven just inside those methods, as usual for execution-joinpoints. Then, the lock/unlock pointcuts match on sychronized blocks (but not synchronized methods, right?), which is something entirely different. But also for those, I do not see why you would need any transformation.
Cheers,
Eric
On 04/04/07, Matthew Webster <matthew_webster@xxxxxxxxxx> wrote:
Eric,
before
() : lock() {}
The (current) limitation exists because
of the need to change the weave to (reliably) put method execution advice
_inside_ the synchronized block but only when that block is the result
of a prior transformation!
Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM United Kingdom Limited
Hursley Park, Winchester, SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Thanks, Matthew, for the comment. However, I don't quite
understand. Why should it be necessary to do this transformation? Why can't
you not just insert the proper advice body call into the body of the synchronized
method. (That's what abc does and it never seemed to cause any problems.)
It would be great if that could be clarified.
Cheers,
Eric
On 03/04/07, Matthew Webster <matthew_webster@xxxxxxxxxx
>
wrote:
Eric,
Please read Bug 123759 "expose join points for synchronized methods/blocks
and define new related pointcuts". Essentially to advise a synchronized
method we must transform it into a non-synchronized method with a synchronized
block. However the existing execution() pointcut matching means that the
method execution join point will occur before the lock rather than after
(as it should do).
Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM United Kingdom Limited
Hursley Park, Winchester, SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Hi all.
ajc is giving me this compiler warning:
advice matching the synchronized method shadow <some method name here>
will be executed outside the lock rather than inside (compiler
limitation)
What does this mean? When ajc injects code into the body of a
synchronized method, is this code then not automatically guarded by
the lock that is assigned when this method is entered? Could somebody
clarify the semantics of that message for me?
Cheers,
Eric
--
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
--
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada _______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
--
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada