Thread
ruby/spec describes 69 methods in core/thread, and Metorex implements 67 of them. The parameters are what Method#parameters answers under Metorex.
Thread#
-
Thread#[]: implemented, parameters[[:req]]. Attribute Reference---Returns the value of a fiber-local variable (current thread's root fiber if not explicitly inside a Fiber), using either a symbol or a string name. -
Thread#[]=: implemented, parameters[[:req], [:req]]. Attribute Assignment---Sets or creates the value of a fiber-local variable, using either a symbol or a string. -
Thread#abort_on_exception: implemented, parameters[]. Returns the status of the thread-local ``abort on exception'' condition for thisthr. An example calling it. -
Thread.abort_on_exception: implemented, parameters[]. Returns the status of the global ``abort on exception'' condition. -
Thread#abort_on_exception=: implemented, parameters[[:req, :wanted]]. When set totrue, if thisthris aborted by an exception, the raised exception will be re-raised in the main thread. -
Thread.abort_on_exception=: implemented, parameters[[:req, :wanted]]. When set totrue, if any thread is aborted by an exception, the raised exception will be re-raised in the main thread. -
Thread#add_trace_func: implemented, parameters[[:req]]. Adds proc as a handler for tracing. -
Thread#alive?: implemented, parameters[]. Returnstrueifthris running or sleeping. An example calling it. -
Thread.allocate: implemented, parameters[[:req, :args]]. -
Thread#backtrace: implemented, parameters[[:rest]]. Returns the current backtrace of the target thread. An example calling it. -
Thread#backtrace_locations: implemented, parameters[[:rest]]. Returns the execution stack for the target thread---an array containing backtrace location objects. An example calling it. -
Thread.current: implemented, parameters[[:req, :args]]. Returns the currently executing thread. An example calling it. -
Thread.each_caller_location: implemented, parameters[[:rest, :args], [:keyrest, :keywords]]. Yields each frame of the current execution stack as a backtrace location object. -
Thread#exit: implemented, parameters[]. Terminatesthrand schedules another thread to be run, returning the terminated Thread. An example calling it. -
Thread.exit: implemented, parameters[[:rest]]. Terminates the currently running thread and schedules another thread to be run. -
Thread#exit!: implemented, parameters[[:rest]]. Exits the process immediately; no exit handlers are called. An example calling it. -
Thread#fetch: implemented, parameters[[:req, :name], [:rest, :default], [:block, :block]]. Returns a fiber-local for the given key. An example calling it. -
Thread.fork: implemented, parameters[]. Basically the same as ::new. -
Thread#group: implemented, parameters[]. Returns the ThreadGroup which contains the given thread. An example calling it. -
Thread.handle_interrupt: implemented, parameters[[:req, :mapping]]. Changes asynchronous interrupt timing. An example calling it. -
Thread.ignore_deadlock: implemented, parameters[]. Returns the status of the global ``ignore deadlock'' condition. An example calling it. -
Thread.ignore_deadlock=: implemented, parameters[[:req, :ignored]]. Returns the new state. -
Thread#initialize: implemented, parameters[[:rest, :_arguments]]. An example calling it. -
Thread#inspect: implemented, parameters[]. Dump the name, id, and status of thr to a string. An example calling it. -
Thread#join: implemented, parameters[[:rest]]. The calling thread will suspend execution and run thisthr. An example calling it. -
Thread#key?: implemented, parameters[[:req]]. Returnstrueif the given string (or symbol) exists as a fiber-local variable. An example calling it. -
Thread#keys: implemented, parameters[]. Returns an array of the names of the fiber-local variables (as Symbols). An example calling it. -
Thread#kill: implemented, parameters[]. Terminatesthrand schedules another thread to be run, returning the terminated Thread. An example calling it. -
Thread.kill: implemented, parameters[[:req, :args]]. Causes the giventhreadto exit, see also Thread::exit. -
Thread.list: implemented, parameters[[:req, :args]]. Returns an array of Thread objects for all threads that are either runnable or stopped. -
Thread.main: implemented, parameters[[:req, :args]]. Returns the main thread. An example calling it. -
Thread#name: implemented, parameters[]. show the name of the thread. An example calling it. -
Thread#name=: implemented, parameters[[:req]]. set given name to the ruby thread. -
Thread#native_thread_id: implemented, parameters[]. Return the native thread ID which is used by the Ruby thread. An example calling it.Metorex: Answers nil for a thread waiting its turn, since every Metorex thread runs on the one operating system thread the interpreter runs on.
-
Thread.new: implemented, parameters[[:rest]]. Creates a new thread executing the given block. An example calling it. -
Thread.pass: implemented, parameters[[:req, :args]]. Give the thread scheduler a hint to pass execution to another thread. An example calling it. -
Thread#pending_interrupt?: implemented, parameters[[:opt, :_error]]. Returns whether or not the asynchronous queue is empty for the target thread. An example calling it. -
Thread.pending_interrupt?: implemented, parameters[[:opt, :_error]]. Returns whether or not the asynchronous queue is empty. An example calling it. -
Thread#priority: implemented, parameters[]. Returns the priority of thr. An example calling it. -
Thread#priority=: implemented, parameters[[:req]]. Sets the priority of thr to integer. -
Thread#raise: implemented, parameters[[:rest, :arguments], [:keyrest, :options]]. Raises an exception from the given thread. An example calling it. -
Thread#report_on_exception: implemented, parameters[]. Returns the status of the thread-local ``report on exception'' condition for thisthr. An example calling it. -
Thread.report_on_exception: implemented, parameters[[:req, :args]]. Returns the status of the global ``report on exception'' condition. An example calling it. -
Thread#report_on_exception=: implemented, parameters[[:req, :wanted]]. When set totrue, a message is printed on $stderr if an exception kills thisthr. -
Thread.report_on_exception=: implemented, parameters[[:req, :args]]. Returns the new state. -
Thread#run: implemented, parameters[]. Wakes upthr, making it eligible for scheduling. An example calling it. -
Thread#set_trace_func: implemented, parameters[[:req, :callable]]. Establishes proc on thr as the handler for tracing, or disables tracing if the parameter isnil. -
Thread.start: implemented, parameters[[:req, :args]]. Basically the same as ::new. An example calling it. -
Thread#status: implemented, parameters[]. Returns the status ofthr. An example calling it. -
Thread.stop: implemented, parameters[]. Stops execution of the current thread, putting it into a ``sleep'' state, and schedules execution of another thread. An example calling it. -
Thread#stop?: implemented, parameters[]. Returnstrueifthris dead or sleeping. An example calling it. -
Thread#terminate: implemented, parameters[]. Terminatesthrand schedules another thread to be run, returning the terminated Thread. An example calling it. -
Thread#thread_variable?: implemented, parameters[[:req]]. Returnstrueif the given string (or symbol) exists as a thread-local variable. -
Thread#thread_variable_get: implemented, parameters[[:req]]. Returns the value of a thread local variable that has been set. An example calling it. -
Thread#thread_variable_set: implemented, parameters[[:req], [:req]]. Sets a thread local withkeytovalue. An example calling it. -
Thread#thread_variables: implemented, parameters[]. Returns an array of the names of the thread-local variables (as Symbols). -
Thread#to_s: implemented, parameters[]. Dump the name, id, and status of thr to a string. An example calling it. -
Thread#value: implemented, parameters[]. Waits forthrto complete, using #join, and returns its value or raises the exception which terminated the thread. An example calling it. -
Thread#wakeup: implemented, parameters[]. Marks a given thread as eligible for scheduling, however it may still remain blocked on I/O. An example calling it.
Thread::Backtrace#
Thread::Backtrace.limit: implemented, parameters[]. Returns maximum backtrace length set by--backtrace-limitcommand-line option.
Thread::Backtrace::Location#
Thread::Backtrace::Location#absolute_path: implemented, parameters[]. Returns the full file path of this frame. An example calling it.Thread::Backtrace::Location#base_label: implemented, parameters[]. Returns the base label of this frame, which is usually equal to the label, without decoration. An example calling it.Thread::Backtrace::Location#inspect: implemented, parameters[]. Returns the same as callinginspecton the string representation of #to_str An example calling it.Thread::Backtrace::Location#label: implemented, parameters[]. Returns the label of this frame. An example calling it.Thread::Backtrace::Location#lineno: implemented, parameters[]. Returns the line number of this frame. An example calling it.Thread::Backtrace::Location#path: implemented, parameters[]. Returns the file name of this frame. An example calling it.Thread::Backtrace::Location#source_range: not implemented.Thread::Backtrace::Location#syntax_tree: not implemented.Thread::Backtrace::Location#to_s: implemented, parameters[]. Returns a Kernel#caller style string representing this frame. An example calling it.
The method summaries are the first sentences of Ruby's own documentation for each method, read from MRI 4.0.6's ri data. Ruby's documentation is distributed under Ruby's license.