Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-fuse
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
Kirill Smelkov
jacobsa-fuse
Commits
100c7af2
Commit
100c7af2
authored
Jun 09, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put a wait group in fileSystemServer.
parent
683decb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
fuseutil/file_system.go
fuseutil/file_system.go
+8
-2
No files found.
fuseutil/file_system.go
View file @
100c7af2
...
...
@@ -18,6 +18,7 @@ import (
"flag"
"io"
"math/rand"
"sync"
"time"
"github.com/jacobsa/fuse"
...
...
@@ -73,11 +74,14 @@ type FileSystem interface {
// cf. http://goo.gl/jnkHPO, fuse-devel thread "Fuse guarantees on concurrent
// requests").
func
NewFileSystemServer
(
fs
FileSystem
)
fuse
.
Server
{
return
fileSystemServer
{
fs
}
return
fileSystemServer
{
fs
:
fs
,
}
}
type
fileSystemServer
struct
{
fs
FileSystem
fs
FileSystem
opsInFlight
sync
.
WaitGroup
}
func
(
s
fileSystemServer
)
ServeOps
(
c
*
fuse
.
Connection
)
{
...
...
@@ -91,6 +95,7 @@ func (s fileSystemServer) ServeOps(c *fuse.Connection) {
panic
(
err
)
}
s
.
opsInFlight
.
Add
(
1
)
go
s
.
handleOp
(
op
)
}
}
...
...
@@ -171,4 +176,5 @@ func (s fileSystemServer) handleOp(op fuseops.Op) {
}
op
.
Respond
(
err
)
s
.
opsInFlight
.
Done
()
}
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