Commit 881a33b
Kun.Long
fix: defer session-lock release on dispose/abort inside active write
When disposeHeldLockAfterRetainedIdle or releaseHeldLockWithFence
are called from within the active retained-write context
(waitForRetainedLockIdle returns false), register a deferred
release callback on retainedLockIdleWaiters instead of silently
returning.
This preserves write serialization (no concurrent writes from
force-release) while ensuring the lock is eventually released
when the retained-use counter drains to zero.
Previously the early return leaked the lock in memory and on disk,
causing subsequent sub-agents to time out with "session file locked"
errors when the web GUI rapidly switches sessions.1 parent 2939ac6 commit 881a33b
1 file changed
Lines changed: 17 additions & 0 deletions
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
800 | 809 | | |
801 | 810 | | |
802 | 811 | | |
| |||
854 | 863 | | |
855 | 864 | | |
856 | 865 | | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
857 | 874 | | |
858 | 875 | | |
859 | 876 | | |
| |||
0 commit comments