Signal in flight.

geesefs-0-30-9
Aaron Jacobs 2015-05-04 22:00:24 +10:00
parent 0b00132020
commit be24b2b3e3
1 changed files with 6 additions and 0 deletions

View File

@ -142,6 +142,12 @@ func (fs *InterruptFS) ReadFile(
var err error
defer fuseutil.RespondToOp(op, &err)
// Signal that a read has been received.
fs.mu.Lock()
fs.readInFlight = true
fs.readInFlightChanged.Broadcast()
fs.mu.Unlock()
// Wait for cancellation.
done := op.Context().Done()
if done == nil {