Top/Lang/Perl/thread

目次

Thread

thread の生成

queue による通信

use threads;
use Thread::Queue;

my ($queue_a) = new Thread::Queue;

# thread 生成時に、 thread 関数の引数として Queue を渡す:
my ($thread_a) = threads->new(\&thread_func_a, $queue_a);

$thread_a->join;

thread 間で共有する変数


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-09-16 (土) 11:31:45