Hi Frank,
Thank you for the report. I tried to reproduce the error. However, I'm not able to reproduce the "Unhandled exception" that you are seeing (testing with ActiveState Perl 5.16.1).
Have you tried including threads to see if that helps. btw, using threads is working -- shown below after the first test case below.
Best Regards,
Mario
################################################
## This is what I got (forking).
################################################
Z:\mce\MCE-1.410\examples>perl -de 0
Loading DB routines from perl5db.pl version 1.37
Editor support available.
Enter h or 'h h' for help, or 'perldoc perldebug' for more help.
main::(-e:1): 0
DB<1> use Cwd qw(abs_path);
DB<2> use lib abs_path . "/../lib";
DB<3> use MCE;
DB<4> $mce = MCE->new(max_workers => 4);
DB<5> $mce->forseq({ begin => 15, end => 10, step => -1 }, sub { \
cont: ($self, $n, $chunk_id) = @_; \
cont: print $n, " from ", $chunk_id , ", " , $self->wid(), "\n"; });
15 from 1, 2
14 from 2, 4
13 from 3, 1
12 from 4, 3
11 from 5, 2
10 from 6, 4
Debugged program terminated. Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.
######### Forked, but do not know how to create a new TTY. #########
######### Forked, but do not know how to create a new TTY. #########
######### Forked, but do not know how to create a new TTY. #########
######### Forked, but do not know how to create a new TTY. #########
Since two debuggers fight for the same TTY, input is severely entangled.
Since two debuggers fight for the same TTY, input is severely entangled.
Since two debuggers fight for the same TTY, input is severely entangled.
Since two debuggers fight for the same TTY, input is severely entangled.
I know how to switch the output to a different window in xterms, OS/2
consoles, and Mac OS X Terminal.app only. For a manual switch, put the name
of the created TTY in $DB::fork_TTY, or define a function
DB::get_fork_TTY() returning this.
On UNIX-like systems one can get the name of a TTY for the given window
by typing tty, and disconnect the shell from TTY by sleep 1000000.
################################################
## Trying the same by including threads -- this is working.
################################################
Z:\mce\MCE-1.410\examples>perl -de 0
Loading DB routines from perl5db.pl version 1.37
Editor support available.
Enter h or 'h h' for help, or 'perldoc perldebug' for more help.
main::(-e:1): 0
DB<1> use Cwd qw(abs_path);
DB<2> use lib abs_path . "/../lib";
DB<3> use threads;
DB<4> use threads::shared;
DB<5> use MCE;
DB<6> $mce = MCE->new(max_workers => 4);
DB<7> $mce->forseq({ begin => 15, end => 10, step => -1 }, sub { \
cont: ($self, $n, $chunk_id) = @_; \
cont: print $n, " from ", $chunk_id , ", ", $self->wid(), "\n"; });
15 from 1, 4
13 from 3, 1
12 from 4, 3
14 from 2, 2
11 from 5, 4
10 from 6, 1
DB<8>