123456789_123456789_123456789_123456789_123456789_

Class: Process::Waiter

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ::Thread
Instance Chain:
self, ::Thread
Inherits: Thread
Defined in: process.c

Class Attribute Summary

::Thread - Inherited

.abort_on_exception

Returns the status of the global “abort on exception'' condition.

.abort_on_exception=

When set to true, if any thread is aborted by an exception, the raised exception will be re-raised in the main thread.

.DEBUG

Returns the thread debug level.

.DEBUG=

Sets the thread debug level.

Class Method Summary

::Thread - Inherited

.current

Returns the currently executing thread.

.exclusive

Wraps the block in a single, VM-global Mutex.synchronize, returning the value of the block.

.exit

Terminates the currently running thread and schedules another thread to be run.

.fork

Basically the same as .new.

.handle_interrupt

Changes asynchronous interrupt timing.

.kill

Causes the given thread to exit, see also Thread.exit.

.list

Returns an array of ::Thread objects for all threads that are either runnable or stopped.

.main

Returns the main thread.

.new

Creates a new thread executing the given block.

.pass

Give the thread scheduler a hint to pass execution to another thread.

.pending_interrupt?

Returns whether or not the asynchronous queue is empty.

.start

Alias for Thread.fork.

.stop

Stops execution of the current thread, putting it into a “sleep'' state, and schedules execution of another thread.

Instance Attribute Summary

::Thread - Inherited

#abort_on_exception

Returns the status of the thread-local “abort on exception'' condition for this thr.

#abort_on_exception=

When set to true, if this thr is aborted by an exception, the raised exception will be re-raised in the main thread.

#name

show the name of the thread.

#name=

set given name to the ruby thread.

#priority

Returns the priority of thr.

#priority=

Sets the priority of thr to integer.

#alive?

Returns true if thr is running or sleeping.

#stop?

Returns true if thr is dead or sleeping.

Instance Method Summary

::Thread - Inherited

#[]

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.

#[]=

Attribute Assignment—Sets or creates the value of a fiber-local variable, using either a symbol or a string.

#add_trace_func

Adds proc as a handler for tracing.

#backtrace

Returns the current backtrace of the target thread.

#backtrace_locations

Returns the execution stack for the target thread—an array containing backtrace location objects.

#exit

Terminates thr and schedules another thread to be run.

#group

Returns the ::ThreadGroup which contains the given thread, or returns nil if thr is not a member of any group.

#inspect

Dump the name, id, and status of thr to a string.

#join

The calling thread will suspend execution and run this thr.

#key?

Returns true if the given string (or symbol) exists as a fiber-local variable.

#keys

Returns an array of the names of the fiber-local variables (as Symbols).

#kill

Alias for Thread#exit.

#pending_interrupt?

Returns whether or not the asynchronous queue is empty for the target thread.

#raise

Raises an exception from the given thread.

#run

Wakes up thr, making it eligible for scheduling.

#safe_level

Returns the safe level in effect for thr.

#set_trace_func

Establishes proc on thr as the handler for tracing, or disables tracing if the parameter is nil.

#status

Returns the status of thr.

#terminate

Alias for Thread#exit.

#thread_variable?

Returns true if the given string (or symbol) exists as a thread-local variable.

#thread_variable_get

Returns the value of a thread local variable that has been set.

#thread_variable_set

Sets a thread local with key to value.

#thread_variables

Returns an array of the names of the thread-local variables (as Symbols).

#value

Waits for thr to complete, using #join, and returns its value or raises the exception which terminated the thread.

#wakeup

Marks a given thread as eligible for scheduling, however it may still remain blocked on I/O.

Constructor Details

This class inherits a constructor from Thread

Instance Method Details

#pid