⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.116
Server IP:
78.40.11.138
Server:
Linux tango.o2switch.net 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
alt
/
ruby33
/
share
/
ri
/
system
/
Thread
/
Queue
/
Edit File: cdesc-Queue.ri
U:RDoc::NormalClass[iI" Queue:ETI"Thread::Queue;TI"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[ I"GThe Thread::Queue class implements multi-producer, multi-consumer ;TI"Cqueues. It is especially useful in threaded programming when ;TI"Hinformation must be exchanged safely between multiple threads. The ;TI"GThread::Queue class implements all the required locking semantics.;To:RDoc::Markup::BlankLine o; ;[I"DThe class implements FIFO (first in, first out) type of queue. ;TI"DIn a FIFO queue, the first tasks added are the first retrieved.;T@o; ;[I" Example:;T@o:RDoc::Markup::Verbatim;[I"queue = Thread::Queue.new ;TI" ;TI"producer = Thread.new do ;TI" 5.times do |i| ;TI"* sleep rand(i) # simulate expense ;TI" queue << i ;TI" puts "#{i} produced" ;TI" end ;TI" end ;TI" ;TI"consumer = Thread.new do ;TI" 5.times do |i| ;TI" value = queue.pop ;TI", sleep rand(i/2) # simulate expense ;TI"" puts "consumed #{value}" ;TI" end ;TI" end ;TI" ;TI"consumer.join;T:@format0: @fileI"thread_sync.c;T:0@omit_headings_from_table_of_contents_below0o;;[ ; I"thread_sync.rb;T;0; 0;0[ [ [ [[I" class;T[[:public[ [:protected[ [:private[[I"new;TI"thread_sync.c;T[I" instance;T[[;[ [;[ [;[[I"<<;T@D[I" clear;T@D[I" close;T@D[I"closed?;T@D[I"deq;TI"thread_sync.rb;T[I"empty?;T@D[I"enq;T@D[I"freeze;T@D[I"length;T@D[I"num_waiting;T@D[I"pop;T@X[I" push;T@D[I" shift;T@X[I" size;T@D[ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[I"thread_sync.c;TI"thread_sync.rb;TI"Thread;TcRDoc::NormalClass
Simpan