るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
7件ヒット [1-7件を表示] (0.027秒)

別のキーワード

  1. http proxy_pass
  2. net/http proxy_pass
  3. thread pass
  4. _builtin pass
  5. http proxy_pass=

検索結果

Thread.pass -> nil (54346.0)

他のスレッドに実行権を譲ります。実行中のスレッドの状態を変えずに、 他の実行可能状態のスレッドに制御を移します。

他のスレッドに実行権を譲ります。実行中のスレッドの状態を変えずに、
他の実行可能状態のスレッドに制御を移します。

Thread.new do
(1..3).each{|i|
p i
Thread.pass
}
exit
end

loop do
Thread.pass
p :main
end

#=>
1
:main
2
:main
3
:main

Object#initialize(*args, &block) -> object (79.0)

ユーザ定義クラスのオブジェクト初期化メソッド。

ユーザ定義クラスのオブジェクト初期化メソッド。

このメソッドは Class#new から新しく生成されたオブ
ジェクトの初期化のために呼び出されます。他の言語のコンストラクタに相当します。
デフォルトの動作ではなにもしません。

initialize には
Class#new に与えられた引数がそのまま渡されます。

サブクラスではこのメソッドを必要に応じて再定義されること
が期待されています。

initialize という名前のメソッドは自動的に private に設定され
ます。

@param args 初期化時の引数です。
@param block 初期化時のブロック引数です。必...

Module#ruby2_keywords(method_name, ...) -> nil (25.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

For the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword argument...

Proc#ruby2_keywords -> proc (25.0)

Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.

Marks the proc as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked ...

Thread (25.0)

スレッドを表すクラスです。スレッドとはメモリ空間を共有して同時に実行される制御の流れです。 Thread を使うことで並行プログラミングが可能になります。

スレッドを表すクラスです。スレッドとはメモリ空間を共有して同時に実行される制御の流れです。
Thread を使うことで並行プログラミングが可能になります。


=== 実装
ネイティブスレッドを用いて実装されていますが、
現在の実装では Ruby VM は Giant VM lock (GVL) を有しており、同時に実行される
ネイティブスレッドは常にひとつです。
ただし、IO 関連のブロックする可能性があるシステムコールを行う場合には
GVL を解放します。その場合にはスレッドは同時に実行され得ます。
また拡張ライブラリから GVL を操作できるので、複数のスレッドを
同時に実行するような拡...

絞り込み条件を変える

Thread.handle_interrupt(hash) { ... } -> object (25.0)

スレッドの割り込みのタイミングを引数で指定した内容に変更してブロックを 実行します。

スレッドの割り込みのタイミングを引数で指定した内容に変更してブロックを
実行します。

「割り込み」とは、非同期イベントや Thread#raise や
Thread#kill、Signal.#trap(未サポート)、メインスレッドの終了
(メインスレッドが終了すると、他のスレッドも終了されます)を意味します。

@param hash 例外クラスがキー、割り込みのタイミングを指定する
Symbol が値の Hash を指定します。
値の内容は以下のいずれかです。

: :immediate

すぐに割り込みます。

: :on_block...

Thread.pending_interrupt?(error = nil) -> bool (25.0)

非同期割り込みのキューが空かどうかを返します。

非同期割り込みのキューが空かどうかを返します。

Thread.handle_interrupt は非同期割り込みの発生を延期させるのに使
用しますが、本メソッドは任意の非同期割り込みが存在するかどうかを確認す
るのに使用します。

本メソッドが true を返した場合、Thread.handle_interrupt で例外の
発生を延期するブロックを終了すると延期させられていた例外を発生させるこ
とができます。

@param error 対象の例外クラスを指定します。省略した場合は全ての例外を対
象に確認を行います。

例: 延期させられていた例外をただちに発生...