Skip to content

Commit 3a489f1

Browse files
committed
Leave only *Handler API
1 parent 256adaa commit 3a489f1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
<a href="https://github.com/cybercog/php-db-locker/blob/master/LICENSE"><img src="https://img.shields.io/github/license/cybercog/php-db-locker.svg?style=flat-square" alt="License"></a>
88
</p>
99

10+
## Things to decide
11+
12+
- [ ] Do we need handle methods? Or leave simple bool for transaction and callback only for session lock
13+
- [ ] Should wait mode be blocking or non-blocking by default?
14+
- [ ] Should callback for session lock be at the end of the params?
15+
1016
## Introduction
1117

1218
> WARNING! This library is currently under development and may not be stable. Use in your services at your own risk.

src/Postgres/PostgresAdvisoryLocker.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ public function withinSessionLevelLock(
126126
return $callback($lockHandle);
127127
}
128128
finally {
129-
$lockHandle->release();
129+
$this->releaseSessionLevelLock(
130+
$dbConnection,
131+
$key,
132+
$accessMode,
133+
);
130134
}
131135
}
132136

0 commit comments

Comments
 (0)