Skip to content

Commit

Permalink
Add note and fix flush call.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Mar 31, 2020
1 parent 841d711 commit dd64294
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/async/io/stream.rb
Expand Up @@ -47,6 +47,8 @@ def initialize(io, block_size: BLOCK_SIZE, maximum_read_size: MAXIMUM_READ_SIZE,
@eof = false

@pending = 0
# This field is ignored, but used to mean, try to buffer packets in a single iteration of the reactor.
# @deferred = deferred

@writing = Async::Semaphore.new(1)

Expand Down
2 changes: 1 addition & 1 deletion spec/async/io/stream_spec.rb
Expand Up @@ -83,7 +83,7 @@

task = reactor.async do
output.write("Hello World")
output.flush(deferred: true)
output.flush
end

expect do
Expand Down

0 comments on commit dd64294

Please sign in to comment.