On 01/21/10 06:25 PM, [email protected] wrote:
I totally agree that this isn't straight forward.  I think the
difficulty is compounded by the fact that we had no explicitly
documented definition of what our existing locks were supposed to
protect, and the fact that we've made piecemeal additions to the API.

I hope that my changes make things a bit more explicit and consistent.
If you think that adding an __enable_cancel() will help, I can add the
function.  My primary concerns for not doing so are twofold:

a. It adds an extra stack frame, which makes SPARC go slower
b. You can explicitly see the lock order in functions this way.  (First
activity lock, then cancel lock).

No, I'm fine with it as is. I think longer-term, I'd like to see the API use python2.6's @contextmanager more often as it makes lock management significantly easier and less prone to error.

--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to