lib/lightio/library/thread.rb in lightio-0.3.1 vs lib/lightio/library/thread.rb in lightio-0.3.2
- old
+ new
@@ -49,17 +49,10 @@
define_method method do |*args|
warn warning_text
obj.public_send method, *args
end
end
-
- def fallback_thread_class_methods(*methods)
- methods.each {|m| fallback_method(RAW_THREAD.main, m, "This method is fallback to native Thread class,"\
- " it may cause unexpected behaviour,"\
- " open issues on https://github.com/socketry/lightio/issues"\
- " if this behaviour not approach you purpose")}
- end
end
include ClassMethods
def fallback_main_thread_methods(*methods)
@@ -74,14 +67,19 @@
end
end
class << self
extend Forwardable
- def_delegators :'LightIO::Library::Thread::RAW_THREAD', :DEBUG, :DEBUG=
+ def_delegators :'LightIO::Library::Thread::RAW_THREAD',
+ :DEBUG,
+ :DEBUG=,
+ :handle_interrupt,
+ :abort_on_exception,
+ :abort_on_exception=,
+ :pending_interrupt?
include FallbackHelper
- fallback_thread_class_methods :abort_on_exception, :abort_on_exception=
def fork(*args, &blk)
obj = allocate
obj.send(:init_core, *args, &blk)
obj
@@ -153,11 +151,10 @@
@thread_mutex = LightIO::Library::Mutex.new
def_delegators :@beam, :alive?, :value
fallback_main_thread_methods :abort_on_exception,
:abort_on_exception=,
- :handle_interrupt,
- :pending_interrupt,
+ :pending_interrupt?,
:add_trace_func,
:backtrace,
:backtrace_locations,
:priority,
:priority=,