るりまサーチ

最速Rubyリファレンスマニュアル検索!
214件ヒット [101-200件を表示] (0.020秒)
トップページ > クエリ:thread[x] > クエリ:backtrace[x]

別のキーワード

  1. drb thread
  2. thread exit
  3. thread kill
  4. thread join
  5. thread backtrace_locations

検索結果

<< < 1 2 3 > >>

Thread::Backtrace::Location#lineno -> Integer (6012.0)

self が表すフレームの行番号を返します。

...self が表すフレームの行番号を返します。

例: Thread::Backtrace::Location の例1を用いた例

//emlist[][ruby]{
loc = c(0..1).first
loc.lineno # => 2
//}...

Thread::Backtrace::Location (6006.0)

Ruby のフレームを表すクラスです。

...s(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.to_s
end
//}

例2の実行結果:

init.rb:4:in `initialize'
init.rb:8:in `new'
init.rb:8:in `<main>'

=== 参考

* Ruby VM アドベントカレンダー #4 vm_backtrace.c: https://www.atdot.net/~ko1/diary/201212.html#d4...

Thread::Backtrace::Location#to_s -> String (6000.0)

self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。

self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し
ます。

//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.to_s
end

# => path/to/foo.rb:5:in `initialize'
# path/to/foo...

Kernel.#caller_locations(range) -> [Thread::Backtrace::Location] | nil (248.0)

現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。

...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。

@param start 開始フレームの位置を数値で指定します。

@param length 取得するフレームの個数を指定します。

@pa...
...(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}

@see Thread::Backtrace::Location, Kernel.#caller...

Kernel.#caller_locations(start = 1, length = nil) -> [Thread::Backtrace::Location] | nil (248.0)

現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。

...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。

@param start 開始フレームの位置を数値で指定します。

@param length 取得するフレームの個数を指定します。

@pa...
...(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}

@see Thread::Backtrace::Location, Kernel.#caller...

絞り込み条件を変える

NEWS for Ruby 2.0.0 (156.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...utex#try_lock, Mutex#synchronize, Mutex#sleep
はトラップハンドラの中では使えなくなりました。そのようなときは ThreadError が発生します
* Mutex#sleep may spurious wakeup. Check after wakeup.

* NilClass
* 追加: NilClass#to_h 空のハッシュ...
...加(起動時にチェックします):
* RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation.
default: 128KB (32bit CPU) or 256KB (64bit CPU).
* RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread
creation. default: 512KB or 1024KB.
* RUB...
...: Thread#thread_variable? 与えられた名前がスレッドローカルな変数であるかどうか返します
* 追加: Thread.handle_interrupt as well as instance and singleton methods
Thread
.pending_interrupt? for asynchronous handling of exceptions
* 追加: Thread#backtrace_...

NEWS for Ruby 3.0.0 (72.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...tty, the `--help`
option shows the help message via the pager designated by the value.
16754

=== `--backtrace-limit` option

The `--backtrace-limit` option limits the maximum length of a backtrace.
8661

== Core classes updates

Outstanding ones only.

* Array
* The following methods now ret...
...-blocking execution contexts. 16786
* Fiber#blocking? tells whether the fiber is non-blocking. 16786
* Fiber#backtrace and Fiber#backtrace_locations provide per-fiber backtrace. 16815
* The limitation of Fiber#transfer is relaxed. 17221
* GC
* GC.auto_compact= and GC.auto_compact h...
...M1.include M2
p C.ancestors #=> [C, M1, M2, Object, Kernel, BasicObject]
//}

* Mutex
* `Mutex` is now acquired per-`Fiber` instead of per-`Thread`. This change should be compatible for essentially all usages and avoids blocking when using a scheduler. 16792
* Proc
* Proc#== and Proc#eq...

NEWS for Ruby 3.1.0 (72.0)

NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...* Thread
* 新規メソッド
* Thread#native_thread_id が追加されました。 17853

* Thread::Backtrace
* 新規メソッド
* --backtrace-limit コマンドラインオプションで設定したバックトレースの長さを制限する値を返す Thread::Backtrace...
....limit が追加されました。 17479

* Thread::Queue
* 変更されたメソッド
* Thread::Queue.new が、初期値のEnumerableオブジェクトを渡せるようになりました。 17327

* Time
* 変更されたメソッド
* Time.new は、Time.at や Time.now...
...を受け取るようになりました。 18003
* MonitorがFiberセーフになりました。 17827
* コピーコルーチンをpthread実装に置き換えました。 18015

* Refinement
* Module#refineで作成されたモジュールを表す新しいクラス。includeとp...

Ruby用語集 (42.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...また、例外オブジェクトは例外が発生した時点までのスタックトレースを保持しており、
Exception#backtrace や Exception#backtrace_locations で
取り出すことができる。

: スーパークラス
: superclass
クラス B がクラス A のサブクラ...
...

↔サブクラス

→継承

: スレッド
: thread
同時に存在して並行的に実行されうる制御の流れ。スレッド間でメモリーは共有される。

参照:spec/thread

: スレッドセーフ
: thread safe
複数のスレッドが並行に実行されて...
...も問題が起きないこと。

: スレッドローカル
: thread local
変数のスコープなどがスレッドごとに別々であること。

例えば特殊変数のうち $0(現在実行中のスクリプトのファイル名)は
グローバルスコープであり、どの...

NEWS for Ruby 2.3.0 (36.0)

NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...==, Proc#yield) は最適化されました。
Backtrace
doesn't show each method (show block lines directly).
TracePoint also ignores these calls.
11569

* Queue (Thread::Queue)
* 終了を通知するために Queue#close(Thread::Queue#close) を追加
10600

* Rege...
...encoding` オプションが追加されました
11785

* Struct
* Struct#dig を追加
11688

* Thread
* スレッド名を扱うために Thread#name, Thread#name= を追加
11251

=== 組み込みクラスの互換性 (機能追加とバグ修正を除く)

* Arra...

絞り込み条件を変える

Rake.application=(app) (18.0)

現在の Rake アプリケーションをセットします。

... backtrace=false, build_all=false, dryrun=false, ignore_deprecate=false, ignore_system=false, job_stats=false, load_system=false, nosearch=false, rakelib=["rakelib"], show_all_tasks=false, show_prereqs=false, show_task_pattern=nil, show_tasks=nil, silent=false, suppress_backtrace_pattern=nil, thread...
<< < 1 2 3 > >>