Can't answer this directly, but have you seen these:
http://www.perl.com/pub/a/2002/06/11/threads.html
http://www.perl.com/pub/a/2002/09/04/threads.html


"John Serink" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Ok, I want a new thread I am creating to be in its own tty console.
> My example code:
> use strict;
> use warnings;
> use threads;
> use threads::shared;
>
> my $var : shared;
> $var=1;
>
> my $thr = threads->new(\&sub1);
> print ("Var is $var\n");
> $thr->join();
> print ("Var is $var\n");
>
> sub sub1 {
> $var++;
> # This print statement I want to be in its own console.
> print("Inside thread\n");
> sleep(2);
> return;
> }
>
> Any suggestions? I thought it would be easy but it turns on not to be. I
> have tried this with fork and can't get that going either.
>
> Cheers,
> John
>


Reply via email to