Displaying 1 result from an estimated 1 matches for "command_runn".
Did you mean:
command_run
2008 Apr 08
0
RSPerl & threads
...anks in advance for your help.
-Jay
#!/usr/bin/perl
use warnings;
use strict;
#use R;
#use RReferences;
#&R::initR("--silent");
use threads;
use threads::shared;
use Thread::Queue;
our $queue : shared = Thread::Queue->new;
our $hold : shared;
my $thr = threads->new (\&command_runner);
$hold =1;
$queue->enqueue("ls");
while ($hold) {
sleep(1);
}
$queue->enqueue("end");
$thr->join();
# Thread for processing functions
sub command_runner {
use R;
use RReferences;
&R::initR("--silent");
my $run = 1;
# run unt...