Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
6826989c
Commit
6826989c
authored
Aug 08, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4e115473
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
go/zodb/connection.go
go/zodb/connection.go
+4
-5
No files found.
go/zodb/connection.go
View file @
6826989c
...
...
@@ -48,9 +48,7 @@ type Connection struct {
stor
IStorage
// underlying storage
db
*
DB
// Connection is part of this DB
txn
transaction
.
Transaction
// opened under this txn; nil if idle in DB pool.
// current view of database; stable inside a transaction.
at
Tid
at
Tid
// current view of database; stable inside a transaction.
// {} oid -> obj
//
...
...
@@ -65,7 +63,8 @@ type Connection struct {
// references to it from other objects:
//
// - deactivate will release obj state (ok)
// - but there will be still reference from connection `oid -> obj` map to this object.
// - but there will be still reference from connection `oid -> obj` map to this object,
// which means the object won't be garbage-collected.
//
// -> we can solve it by using "weak" pointers in the map.
//
...
...
@@ -98,7 +97,7 @@ type Connection struct {
// https://groups.google.com/forum/#!topic/golang-nuts/PYWxjT2v6ps
//
// NOTE2 finalizers don't run on when they are attached to an object in cycle.
// Hopefully we don't have cycles with
ZBTree/ZBucket XXX verify this
// Hopefully we don't have cycles with
BTree/Bucket.
objmu
sync
.
Mutex
objtab
map
[
Oid
]
*
weak
.
Ref
// oid -> weak.Ref(IPersistent)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment