
8 Aug
2004
8 Aug
'04
1:53 p.m.
On Aug 8, 2004, at 6:00 AM, Bronek Kozicki wrote:
But when that happens, the generic lock(lock1,lock2) function no longer works:
I'm little scared about such lock function, where order of lock operations is disconnected from order of unlock operations. However this is something that possibly could be fixed - I'm thinking about building chains of locks.
I can't think of any reason for concern about unlock order. However you're right that it can be fixed. Just make it an object lock_both<Lock1, Lock2>, and record the order that you lock within the lock_both so that you can use that information to unlock. -Howard