Skip to content

Commit

Permalink
Add IChannel#closed?.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Gleeson committed Nov 17, 2012
1 parent 0e475a4 commit d07118c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/ichannel.rb
Expand Up @@ -9,6 +9,14 @@ def initialize(serializer)
@serializer = serializer
end

#
# @return [Boolean]
# Returns true when the channel is closed.
#
def closed?
@reader.closed? && @writer.closed?
end

#
# Close the channel.
#
Expand Down

0 comments on commit d07118c

Please sign in to comment.