
8 Aug
2004
8 Aug
'04
10 a.m.
Howard Hinnant 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.
If sharable and upgradable are merged, then the above mistake could transform itself from a compile time error into a run time error.
Right, this is weak point of moving difference in lock semantics from compile time to runtime. Now I agree with you that we should take benefit of type system to avoid such problems. B.