Skip to content

[DIFF] Tracing Regions - #109

Open
xFrednet wants to merge 30 commits into
tregions-basefrom
tregions-main
Open

[DIFF] Tracing Regions#109
xFrednet wants to merge 30 commits into
tregions-basefrom
tregions-main

Conversation

@xFrednet

@xFrednet xFrednet commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

The current implementation of tracing regions

xFrednet and others added 30 commits April 8, 2026 17:22
Example Code:

```

import sqlite3
from immutable import TracingRegion as Region
from immutable import set_freezable, FREEZABLE_YES, Cown
import collections

set_freezable(collections._tuplegetter, FREEZABLE_YES)

c = Cown(Region())

c.value.db = sqlite3.connect("dummy.db")

c.release()

c.acquire()

c.value.db.close()

print("Done")
```
TRegions: Support Region References.
When freeze() failed or restarted from a pre-freeze hook while an SCC was still pending, rollback treated pending SCC state as if it had already been completed. Finish pending SCC bookkeeping from the DFS stack before undoing freeze work, and explicitly discard any incomplete traversal for the current item on ordinary errors.

This also factors shared SCC completion logic, restores rollback for retained weakref references, clears non-GC visited state on rollback, and adds regressions for nested pre-freeze restarts and failed freezes with pending SCCs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@xFrednet xFrednet changed the title Tracing Regions Diff [DIFF] Tracing Regions Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants