Commit ed4a167
committed
Use cancel in disconnect and NIF for set_busy_timeout
- Replace Sqlite3.interrupt(db) with Sqlite3.cancel(db) in disconnect/2
(cancel is a superset that also wakes the busy handler condvar)
- Replace PRAGMA busy_timeout with Sqlite3.set_busy_timeout NIF call
(PRAGMA internally calls sqlite3_busy_timeout which destroys custom handlers)
Together these changes complete the fix for #192 - disconnect now properly
cancels all three blocking planes (VDBE execution, busy handler sleep, and
mutex contention as a side effect of the first two).1 parent 0e90b8e commit ed4a167
2 files changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1790 | 1790 | | |
1791 | 1791 | | |
1792 | 1792 | | |
| 1793 | + | |
| 1794 | + | |
1793 | 1795 | | |
| 1796 | + | |
1794 | 1797 | | |
1795 | 1798 | | |
1796 | 1799 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
216 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
217 | 218 | | |
218 | | - | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
| |||
513 | 514 | | |
514 | 515 | | |
515 | 516 | | |
516 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
517 | 520 | | |
518 | 521 | | |
519 | 522 | | |
| |||
0 commit comments