Sha256: 369824458a2279874123f16a7a8f1b8176b2a32576b082028a362ea5e939d9d5

Contents?: true

Size: 470 Bytes

Versions: 13

Compression:

Stored size: 470 Bytes

Contents

# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)

require 'sleepy_penguin'

# add this as a level-triggered to any thread pool stuck on epoll_wait
# and watch it die!
if SleepyPenguin.const_defined?(:EventFD)
  class Yahns::QueueQuitter < Yahns::Sigevent # :nodoc:
    def yahns_step
      Thread.current.exit
    end
  end
else
  require_relative 'queue_quitter_pipe'
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
yahns-1.9.0 lib/yahns/queue_quitter.rb
yahns-1.8.0 lib/yahns/queue_quitter.rb
yahns-1.7.0 lib/yahns/queue_quitter.rb
yahns-1.6.0 lib/yahns/queue_quitter.rb
yahns-1.5.0 lib/yahns/queue_quitter.rb
yahns-1.4.0 lib/yahns/queue_quitter.rb
yahns-1.3.1 lib/yahns/queue_quitter.rb
yahns-1.3.0 lib/yahns/queue_quitter.rb
yahns-1.2.0 lib/yahns/queue_quitter.rb
yahns-1.1.0 lib/yahns/queue_quitter.rb
yahns-1.0.0 lib/yahns/queue_quitter.rb
yahns-0.0.3 lib/yahns/queue_quitter.rb
yahns-0.0.2 lib/yahns/queue_quitter.rb