34件ヒット
[1-34件を表示]
(0.075秒)
検索結果
先頭3件
-
Thread
:: Queue # close -> self (18164.0) -
キューを close します。close 済みのキューを再度 open することはできません。
...キューを close します。close 済みのキューを再度 open することはできません。
close 後は以下のように動作します。
* Thread::Queue#closed? は true を返します
* Thread::Queue#close は無視されます
* Thread::Queue#enq/push/<< は ClosedQueueError......ます
* Thread::Queue#empty? が false を返す場合は Thread::Queue#deq/pop/shift は通常通りオブジェクトを返します
また、ClosedQueueError は StopIteration を継承しているため、
close する事でループから脱出する事もできます。
例:
q = Queue.n......ew
Thread.new{
while e = q.deq # wait for nil to break loop
# ...
end
}
q.close... -
CGI
# header(options = "text / html") -> String (13.0) -
HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。
...= "200 OK"
# "status" => "200 GOOD",
"server" => ENV['SERVER_SOFTWARE'],
"connection" => "close",
"type" => "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/html; charset......my_header1" => "my_value",
"my_header2" => "my_value"})
例:
cgi = CGI.new('html3')
print cgi.header({"charset" => "shift_jis", "status" => "OK"})
print "<html><head><title>TITLE</title></head>\r\n"
print "<body>BODY</body></html>\r\n"
@see 35911... -
CGI
# out(options = "text / html") { . . . . } (13.0) -
HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。
...。
HEADリクエスト (REQUEST_METHOD == "HEAD") の場合は HTTP ヘッダのみを出力します。
charset が "iso-2022-jp"・"euc-jp"・"shift_jis" のいずれかで
ある場合は文字列エンコーディングを自動変換し、language を "ja"にします。
@param options Hash......e,
"status" => "OK", # == "200 OK"
"server" => ENV['SERVER_SOFTWARE'],
"connection" => "close",
"type" => "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/html; char...