don't bother with the plot thread if we're not streaming

Ignore-this: d748c070654b61db45e27490428df154

darcs-hash:20090827170849-0cb85-e6e0499441f19560a8f6fbf10fadd5060f659a03.gz
This commit is contained in:
Dima Kogan 2009-08-27 10:08:49 -07:00
parent 07a13f7977
commit 3d5760a361

View File

@ -73,7 +73,7 @@ my $xwindow = $options{"xlen"};
# now start the data acquisition and plotting threads # now start the data acquisition and plotting threads
my $dataQueue = Thread::Queue->new(); my $dataQueue = Thread::Queue->new();
my $addThr = threads->create(\&mainThread); my $addThr = threads->create(\&mainThread);
my $plotThr = threads->create(\&plotThread); my $plotThr = threads->create(\&plotThread) if(!$options{"stream"});
while(<>) while(<>)
{ {
@ -84,7 +84,7 @@ $dataQueue->enqueue("Plot now");
$dataQueue->enqueue(undef); $dataQueue->enqueue(undef);
$addThr->join(); $addThr->join();
$plotThr->join(); $plotThr->join() if(!$options{"stream"});