⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 io.t

📁 UNIX下perl实现代码
💻 T
字号:
use Thread;sub counter {$count = 10;while ($count--) {    sleep 1;    print "ping $count\n";}}sub reader {    my $line;    while ($line = <STDIN>) {	print "reader: $line";    }    print "End of input in reader\n";    return 0;}print <<'EOT';This test starts up a thread to read and echo whatever is typed onthe keyboard/stdin, line by line, while the main thread counts downto zero. The test stays running until both the main thread hasfinished counting down and the I/O thread has seen end-of-file onthe terminal/stdin.EOT$r = new Thread \&counter;&reader;__END__$count = 10;while ($count--) {    sleep 1;    print "ping $count\n";}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -