Skip to content

Commit

Permalink
clean up cruft, reindent in c_zookeeper
Browse files Browse the repository at this point in the history
  • Loading branch information
slyphon committed Aug 15, 2012
1 parent f0be151 commit 9da460f
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions ext/c_zookeeper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -278,19 +278,16 @@ def event_thread_body
logger.debug { "finished completions" }
end

# in shutting down state, no more can be added to @reg
# if @_shutting_down # TODO: this should probably also happen in the is_unrecoverable case!
# anything left over after all that gets the finger
remaining = @reg.next_batch + @reg.in_flight.values
# anything left over after all that gets the finger
remaining = @reg.next_batch + @reg.in_flight.values

logger.debug { "there are #{remaining.length} completions to awaken" }
logger.debug { "there are #{remaining.length} completions to awaken" }

@reg.in_flight.clear
@reg.in_flight.clear

while cb = remaining.shift
cb.shutdown!
end
# end
while cb = remaining.shift
cb.shutdown!
end
rescue ShuttingDownException
logger.error { "event thread saw @_shutting_down, bailing without entering loop" }
ensure
Expand Down

0 comments on commit 9da460f

Please sign in to comment.