Reader: Changing responsiveness should wake blocked reads
This commit is contained in:
parent
57fec52371
commit
23363506f5
|
@ -50,11 +50,13 @@ var _ io.ReadCloser = &reader{}
|
||||||
// soon as they can when the underlying chunks become available.
|
// soon as they can when the underlying chunks become available.
|
||||||
func (r *reader) SetResponsive() {
|
func (r *reader) SetResponsive() {
|
||||||
r.responsive = true
|
r.responsive = true
|
||||||
|
r.t.cl.event.Broadcast()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable responsive mode. TODO: Remove?
|
// Disable responsive mode. TODO: Remove?
|
||||||
func (r *reader) SetNonResponsive() {
|
func (r *reader) SetNonResponsive() {
|
||||||
r.responsive = false
|
r.responsive = false
|
||||||
|
r.t.cl.event.Broadcast()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure the number of bytes ahead of a read that should also be
|
// Configure the number of bytes ahead of a read that should also be
|
||||||
|
|
Loading…
Reference in New Issue