Added a warning on Connection.ReadOp.

Aaron Jacobs 2015-03-24 15:23:19 +11:00
parent 0252cb61e6
commit be2f3fc73e
1 changed files with 17 additions and 1 deletions

View File

@ -14,12 +14,28 @@
package fuse
import ""
import (
// A connection to the fuse kernel process.
type Connection struct {
logger *log.Logger
func newConnection(wrapped *bazilfuse.Conn) (c *Connection, err error)
// Read the next op from the kernel process. Return io.EOF if the kernel has
// closed the connection.
// This function delivers ops in exactly the order they are received from
// /dev/fuse. Be wary of naively calling it concurrently: you probably want
// ordering guarantees between e.g. write ops and flush ops. For example,
// close(2) causes WriteFileOps to be issued before a FlushFileOp, but doesn't
// wait for their response before issuing the latter (cf.
func (c *Connection) ReadOp() (op fuseops.Op, err error)