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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
753d82f5
Commit
753d82f5
authored
Jul 19, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6fbf83f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
wcfs/zodb.go
wcfs/zodb.go
+2
-13
wcfs/zodbpy.go
wcfs/zodbpy.go
+9
-0
No files found.
wcfs/zodb.go
View file @
753d82f5
...
...
@@ -16,14 +16,10 @@ package main
import
(
"context"
"fmt"
"sync"
// "sync/atomic"
"lab.nexedi.com/kirr/go123/mem"
"lab.nexedi.com/kirr/neo/go/zodb"
pickle
"github.com/kisielk/og-rek"
)
// XXX make methods private, e.g. _pJar ?
...
...
@@ -230,11 +226,7 @@ func (obj *object) PActivate(ctx context.Context) (err error) {
doload
:=
(
obj
.
refcnt
==
1
&&
obj
.
state
==
GHOST
)
defer
func
()
{
if
err
!=
nil
{
// no need to check for drop - the state is already
// dropped - we just need to decref here.
//
// XXX locking
obj
.
deactivate
()
// XXX -> drop?
obj
.
PDeactivate
()
}
}()
if
!
doload
{
...
...
@@ -275,9 +267,7 @@ func (obj *object) PActivate(ctx context.Context) (err error) {
err
=
obj
.
instance
.
SetState
(
state
)
// XXX err ctx
state
.
Release
()
}
if
err
!=
nil
{
obj
.
instance
.
DropState
()
// XXX already in deactivate
}
else
{
if
err
==
nil
{
obj
.
state
=
UPTODATE
}
...
...
@@ -289,7 +279,6 @@ func (obj *object) PActivate(ctx context.Context) (err error) {
return
err
// XXX err ctx
}
// PDeactivate implements Object.
func
(
obj
*
object
)
PDeactivate
()
{
obj
.
mu
.
Lock
()
...
...
wcfs/zodbpy.go
View file @
753d82f5
...
...
@@ -14,6 +14,15 @@
package
main
// Bits that should be in ZODB XXX -> zodb
import
(
"context"
"fmt"
"lab.nexedi.com/kirr/neo/go/zodb"
pickle
"github.com/kisielk/og-rek"
)
// PyObject is the interface that every in-RAM object representing Python ZODB object implements.
type
PyObject
interface
{
Object
...
...
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