Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] if and loop pointcuts

>Before thinking about this more, I want to ask why you don't want to do
>the simpler thing of just releasing the lock when the enclosing method
>terminates? It seems to me that you'll have a lot of overhead for counting
>gets/sets and figuring out which path you are on. While I can see that
>minimizing the locking window is good, I wonder if you'll be paying so
>much for it that it won't be worth it.

    Perhaps you are right with the overhead I can encounter. 
    Still, this is exactly what I am after: to release the lock BEFORE the end 
of the method (especially if the field access happens somewhere at the 
beginning). 
    This way, e.g. another method that wants to access the field (say "a") can 
do it without waiting the previous method to end, and, maybe (I really hope 
that) gain in response time, as compared with the situation when it has to wait 
for the first one to finish before it can start accessing "a". 
     

      Thanks again,
        Diana.





Back to the top