るりまサーチ

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

別のキーワード

  1. pop start
  2. pop3 start
  3. net/pop pop
  4. net/pop start
  5. pop delete_all

ライブラリ

モジュール

オブジェクト

キーワード

検索結果

<< < ... 15 16 17 >>

Readline::HISTORY.shift -> String (6.0)

ヒストリの最初の内容を取り出します。 最初の内容は、ヒストリから取り除かれます。

...発生します。

例:

require "readline"

Readline::HISTORY.push("foo", "bar", "baz")
p Readline::HISTORY.shift #=> "foo"
p Readline::HISTORY.shift #=> "bar"
p Readline::HISTORY.shift #=> "baz"

@see Readline::HISTORY.push、Readline::HISTORY.pop
Readline::HISTORY.delete_at...

Thread#ignore_deadlock=(bool) (6.0)

デッドロック検知を無視する機能をon/offします。デフォルト値はfalseです。

...

trueを渡すとデッドロックを検知しなくなります。

//emlist[][ruby]{
Thread.ignore_deadlock = true
queue = Thread::Queue.new

trap(:SIGUSR1){queue.push "Received signal"}

# ignore_deadlockがfalseだとエラーが発生する
puts queue.pop
//}

@see Thread#ignore_deadlock...

Thread::Queue (6.0)

Queue はスレッド間の FIFO(first in first out) の通信路です。ス レッドが空のキューを読み出そうとすると停止します。キューになんら かの情報が書き込まれると実行は再開されます。

...ス Thread::SizedQueue も提供されています。

=== 例

require 'thread'

q = Queue.new

th1 = Thread.start do
while resource = q.pop
puts resource
end
end

[:resource1, :resource2, :resource3, nil].each{|r|
q.push(r)
}

th1.join

実行すると以下のよ...

Thread::Queue#close -> self (6.0)

キューを close します。close 済みのキューを再度 open することはできません。

...ます
* Thread::Queue#enq/push/<< は ClosedQueueError を発生します
* Thread::Queue#empty? が false を返す場合は Thread::Queue#deq/pop/shift は通常通りオブジェクトを返します

また、ClosedQueueError は StopIteration を継承しているため、
close する事で...

Thread::Queue#num_waiting -> Integer (6.0)

キューを待っているスレッドの数を返します。

...キューを待っているスレッドの数を返します。

//emlist[例][ruby]{
require 'thread'

q = SizedQueue.new(1)
q.push(1)
t = Thread.new { q.push(2) }
sleep 0.05 until t.stop?
q.num_waiting # => 1

q.pop
t.join
//}...

絞り込み条件を変える

Thread::SizedQueue (6.0)

サイズの最大値を指定できる Thread::Queue です。

...れる行が同じ順序になります。
q = [] にすると入力と違った順序で行が出力されます。

require 'thread'

q = SizedQueue.new(1)

th = Thread.start {
while line = q.pop
print line
end
}

while l = gets
q.push(l)
end
q.push(l)

th.join...

ThreadsWait#next_wait(nonblock = nil) -> Thread (6.0)

指定したスレッドのどれかが終了するまで待ちます。

...rue でかつ、キューが空の時、発生します。

#使用例
require 'thwait'

threads = []
2.times {|i|
threads << Thread.new { sleep i }
}

thall = ThreadsWait.new
thall.join_nowait(*threads)
until thall.empty?
th = thall.next_wait
p th
end

@see Queue#pop...

net/protocol (6.0)

ネットワークライブラリ共通の例外クラスを 定義しています。

...ネットワークライブラリ共通の例外クラスを
定義しています。

net/http や net/pop などでこのライブラリで
定義された例外クラスやそれらを継承した例外クラスを
利用しています。...

ruby 1.8.4 feature (6.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...fill): should adjust array length correctly when
# an array is expanded in the fill process. [ruby-core:06625]

Arrayに対してfillとpopを繰り返すとSEGVするバグを修正しました。((<ruby-core:06625>))

: String#scan [bug]

#Thu Oct 27 16:45:31 2005 Yukihiro Matsumoto...
<< < ... 15 16 17 >>