Release one level of the current lock. When the lock level reaches zero the underlying SQLite transaction is rolled back, releasing the database lock. :param force: if ``True``, release the lock completely regardless of the current lock level :raises RuntimeError:
(self, *, force: bool = False)
| 408 | self.release() |
| 409 | |
| 410 | def release(self, *, force: bool = False) -> None: |
| 411 | """ |
| 412 | Release one level of the current lock. |
| 413 | |
| 414 | When the lock level reaches zero the underlying SQLite transaction is rolled back, releasing the database lock. |
| 415 | |
| 416 | :param force: if ``True``, release the lock completely regardless of the current lock level |
| 417 | |
| 418 | :raises RuntimeError: if no lock is currently held and *force* is ``False`` |
| 419 | |
| 420 | """ |
| 421 | with _fork_transition(): |
| 422 | _ensure_current_process() |
| 423 | if self._inherited: # pragma: needs fork |
| 424 | return |
| 425 | self._raise_if_acquiring("release") |
| 426 | self._release(force=force, close=False) |
| 427 | |
| 428 | def close(self) -> None: |
| 429 | """ |