ForNext
Only Do What Only You Can Do
169. start thread
Hyperpolyglot Interpreted Languages: PHP, Perl, Python, Ruby より (2012.05.08)
VBScript
JScript
Perl
use threads; $func = sub { sleep 10 }; $thr = threads->new($func);
PHP
none
Python
class sleep10(threading.Thread): def run(self): time.sleep(10) thr = sleep10() thr.start()
Ruby
thr = Thread.new { sleep 10 }