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

> No, I want to have an aspect that takes a lock at the 
> first access to a 
> variable (this is easy to detect) and releases the lock after 
> the last access to 
> that variable (and here comes my problem).

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.

I see some other issues, but I wanted to ask this question first, before
trying to think about those other issues.




Back to the top