Release locks on abort
Fixes deadlock if hook_checkout returns ABORT. One of these days I want to implement the abort mechanism through exceptions, even though that means handling it explicitly in more places. Or maybe *because* that means handling it explicitly in more places.
This commit is contained in:
parent
094fbcb1db
commit
6089e212dc
2 changed files with 5 additions and 0 deletions
|
@ -60,6 +60,10 @@ sub release_lock() {
|
|||
}
|
||||
}
|
||||
|
||||
sub release_all_locks() {
|
||||
release_lock while $lockcount;
|
||||
}
|
||||
|
||||
sub with_lock :prototype(&) ($code) {
|
||||
get_lock;
|
||||
my @rv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue