marioroy / mce-perl

Many-Core Engine for Perl
Other
45 stars 5 forks source link

It does not block with the dequeue after dequeue_nb. #8

Closed bokutin closed 7 years ago

bokutin commented 7 years ago

Hi.

% cat dequeue_nb.pl

#!/usr/bin/env perl
use MCE;
use MCE::Queue;
my $q = MCE::Queue->new;
$q->enqueue(1);
print $q->dequeue_nb;
print $q->dequeue; # blocking?
die "I did not block with the above code. Is this correct?";

% perl dequeue_nb.pl I did not block with the above code. Is this correct? at dequeue_nb.pl line 8. 1%

marioroy commented 7 years ago

Hi Tomohiro,

This is fixed for the 1.830 release and committed into trunk. MCE 1.830 will be released on CPAN in a couple of days.

Thank you for the bug report.

Regards, Mario

bokutin commented 7 years ago

Thank you for the quick fix!

A similar problem seems to occur also in MCE::Shared.

% cat ./dequeue_nb.pl

#!/usr/bin/env perl
use lib "mce-perl/lib";
use MCE;
use MCE::Shared;
my $q = MCE::Shared->queue;
$q->enqueue(1);
print $q->dequeue_nb;
print $q->dequeue;
die "I did not block with the above code. Is this correct?";

% perl ./dequeue_nb.pl I did not block with the above code. Is this correct? at ./dequeue_nb.pl line 10, <__ANONIO__> line 2. 1%

marioroy commented 7 years ago

Hi Tomohiro,

To not miss this, I fixed MCE::Shared locally on my machine and want to complete the change log and documentation before committing into Github. MCE::Shared 1.827 will be released in a couple of days along with MCE 1.830.

Thank you.

Regards, Mario

bokutin commented 7 years ago

Sorry to bother you, but thank you very much for your time.

marioroy commented 7 years ago

Hi Tomohiro,

All the updates completed thus far for MCE::Shared were committed into Github. Upon doing the documentation updates, I realized there is more to do. I will try to finish by the end of August.

Thank you again for this bug report. Both MCE::Queue and MCE::Shared::Queue are current.

Regards, Mario

marioroy commented 7 years ago

MCE 1.830 was released today containing the fix. Thank you.