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
c5d4e890
Commit
c5d4e890
authored
Jul 16, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
bb378738
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
wcfs/btree.go
wcfs/btree.go
+14
-1
wcfs/zodb.go
wcfs/zodb.go
+1
-1
No files found.
wcfs/btree.go
View file @
c5d4e890
...
@@ -192,12 +192,25 @@ func (b *ZBucket) PDeactivate() {
...
@@ -192,12 +192,25 @@ func (b *ZBucket) PDeactivate() {
// PActivate implements Object.
// PActivate implements Object.
func
(
b
*
ZBucket
)
PActivate
(
ctx
context
.
Context
)
(
bool
,
error
)
{
func
(
b
*
ZBucket
)
PActivate
(
ctx
context
.
Context
)
(
bool
,
error
)
{
// XXX check if already activated
activated
,
err
:=
b
.
pyObject
.
PActivate
(
ctx
)
activated
,
err
:=
b
.
pyObject
.
PActivate
(
ctx
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
if
!
activated
{
return
false
,
nil
}
// FIXME other users must wait for first decode to complet
err
=
b
.
decode
()
if
err
!=
nil
{
b
.
pyObject
.
PDeactivate
()
return
false
,
err
}
return
true
,
nil
}
func
(
b
*
ZBucket
)
decode
()
error
{
t
,
ok
:=
b
.
pyObject
.
pystate
.
(
pickle
.
Tuple
)
t
,
ok
:=
b
.
pyObject
.
pystate
.
(
pickle
.
Tuple
)
if
!
ok
||
!
(
1
<=
len
(
t
)
&&
len
(
t
)
<=
2
)
{
if
!
ok
||
!
(
1
<=
len
(
t
)
&&
len
(
t
)
<=
2
)
{
// XXX complain
// XXX complain
...
...
wcfs/zodb.go
View file @
c5d4e890
...
@@ -533,7 +533,7 @@ func (pyobj *pyObject) PActivate(ctx context.Context) (bool, error) {
...
@@ -533,7 +533,7 @@ func (pyobj *pyObject) PActivate(ctx context.Context) (bool, error) {
pyobj
.
pystate
=
pystate
pyobj
.
pystate
=
pystate
pyobj
.
loaderr
=
err
pyobj
.
loaderr
=
err
close
(
pyobj
.
ready
)
close
(
pyobj
.
ready
)
return
err
// XXX err ctx
return
true
,
err
// XXX err ctx
}
}
...
...
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