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
ee0a56f5
Commit
ee0a56f5
authored
Jan 18, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9a397e07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
wcfs/misc.go
wcfs/misc.go
+12
-4
wcfs/wcfs.go
wcfs/wcfs.go
+5
-0
No files found.
wcfs/misc.go
View file @
ee0a56f5
...
...
@@ -354,12 +354,20 @@ func (f *skFile) Flush() fuse.Status {
// ---- ZODB ---
// typeOf returns
ZODB type of an object
.
// typeOf returns
string for object's type
.
//
// it differs from %T in fmt in that it supports printing zodb.Broken with
// details properly.
// - for ZODB objects, it uses zodb.ClassOf, which in particular supports
// printing zodb.Broken with details properly.
//
// - for other objects, it uses %T.
func
typeOf
(
obj
interface
{})
string
{
return
zodb
.
ClassOf
(
obj
)
switch
obj
:=
obj
.
(
type
)
{
case
zodb
.
IPersistent
:
return
zodb
.
ClassOf
(
obj
)
default
:
return
fmt
.
Sprintf
(
"%T"
,
obj
)
}
}
// ZConn is zodb.Connection + associated read-only transaction under which
...
...
wcfs/wcfs.go
View file @
ee0a56f5
...
...
@@ -382,6 +382,7 @@ import (
"fmt"
stdlog
"log"
"os"
"runtime"
"strings"
"sync"
"syscall"
...
...
@@ -585,6 +586,7 @@ func (root *Root) zhandle1(zevent zodb.CommitEvent) {
// zevent = (tid^, []oid)
for
_
,
oid
:=
range
zevent
.
Changev
{
// XXX zhead.Cache() lock/unlock + comment it is not really needed
obj
:=
zhead
.
Cache
()
.
Get
(
oid
)
if
obj
==
nil
{
continue
// nothing to do - see invariant
...
...
@@ -630,6 +632,9 @@ func (root *Root) zhandle1(zevent zodb.CommitEvent) {
// XXX shutdown fs with ^^^ message.
}
// make sure obj won't be garbage-collected until we finish handling it.
runtime
.
KeepAlive
(
obj
)
}
//wg = ...
...
...
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