Handle each op in its own goroutine.

geesefs-0-30-9
Aaron Jacobs 2015-04-02 10:52:58 +11:00
parent 4d06d8aef8
commit 0461ddac4f
1 changed files with 62 additions and 58 deletions

View File

@ -104,6 +104,11 @@ func (s fileSystemServer) ServeOps(c *fuse.Connection) {
panic(err)
}
go s.handleOp(op)
}
}
func (s fileSystemServer) handleOp(op fuseops.Op) {
switch typed := op.(type) {
default:
op.Respond(fuse.ENOSYS)
@ -162,5 +167,4 @@ func (s fileSystemServer) ServeOps(c *fuse.Connection) {
case *fuseops.ReleaseFileHandleOp:
s.fs.ReleaseFileHandle(typed)
}
}
}