Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
93329980
Commit
93329980
authored
Apr 03, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
aa3a9abf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
bigfile/_file_zodb.pyx
bigfile/_file_zodb.pyx
+6
-10
No files found.
bigfile/_file_zodb.pyx
View file @
93329980
...
...
@@ -113,7 +113,6 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
if
zf
.
wfileh
==
nil
:
zconn
=
zf
.
zself
.
_p_jar
assert
zconn
is
not
None
# XXX locking? or rely on that ZODB objects for zconn must be used from under 1 thread only?
# join zconn to wconn; link to wconn from _ZBigFile
pywconn
=
pywconnOf
(
zconn
)
...
...
@@ -127,14 +126,14 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
# pywconnOf establishes and returns (py) wcfs.Conn associated with zconn.
#
# returned wcfs.Conn will be maintained to keep in sync with zconn.
# returned wcfs.Conn will be maintained to keep in sync with zconn, and will be
# closed when zconn is destroyed.
#
# XXX closed on zconn dealloc ?
# XXX simultaneous call?
# XXX move -> .py ?
# It is invalid to make simultaneous calls to pywconnOf with the same zconn.
# (in ZODB/py objects for zconn must be used from under 1 thread only).
cdef
wcfs
.
PyConn
pywconnOf
(
zconn
):
assert
isinstance
(
zconn
,
ZConnection
)
assert
zconn
.
opened
# XXX needed?
assert
zconn
.
opened
# XXX locking
wconn
=
getattr
(
zconn
,
'_wcfs_wconn'
,
None
)
...
...
@@ -164,8 +163,7 @@ class ZSync:
# .wconn (py) wcfs.Connection
def
__init__
(
zsync
,
zconn
,
wconn
):
#print('ZSync %r %r' % (zconn, wconn))
assert
zconn
.
open
assert
zconn
.
opened
zsync
.
wconn
=
wconn
zsync
.
zconn_ref
=
weakref
.
ref
(
zconn
,
zsync
.
on_zconn_dealloc
)
...
...
@@ -183,7 +181,5 @@ class ZSync:
# DB resyncs .zconn onto new database view.
# -> resync .wconn to updated database view of ZODB connection.
def
on_connection_resync
(
zsync
):
#print('\nZZZSync.resync %r %r' % (zsync.zconn, zsync.wconn))
#import traceback; traceback.print_stack()
zconn
=
zsync
.
zconn_ref
()
zsync
.
wconn
.
resync
(
zconn_at
(
zconn
))
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