Group :: Development/Other
RPM: perl-Coro
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: Coro-6.57-perl7.patch
Download
Download
--- Coro-6.57/Coro.pm 2020-07-29 13:08:58.000000000 +0000
+++ Coro-6.57/Coro.pm 2021-06-21 15:40:21.727350016 +0000
@@ -426,25 +426,25 @@
=cut
# ||= because other modules could have provided their own by now
-$idle ||= new Coro sub {
+$idle ||= Coro->new( sub {
require Coro::Debug;
die "FATAL: deadlock detected.\n"
. Coro::Debug::ps_listing ();
-};
+});
# this coro is necessary because a coro
# cannot destroy itself.
our @destroy;
our $manager;
-$manager = new Coro sub {
+$manager = Coro->new(sub {
while () {
_destroy shift @destroy
while @destroy;
&schedule;
}
-};
+});
$manager->{desc} = "[coro manager]";
$manager->prio (PRIO_MAX);
@@ -1057,7 +1057,7 @@
# to reduce pressure on the coro pool (because most callbacks
# return immediately and can be reused) and because we cannot cede
# inside an event callback.
-our $unblock_scheduler = new Coro sub {
+our $unblock_scheduler = Coro->new(sub {
while () {
while (my $cb = pop @unblock_queue) {
&async_pool (@$cb);
@@ -1069,7 +1069,7 @@
}
schedule; # sleep well
}
-};
+});
$unblock_scheduler->{desc} = "[unblock_sub scheduler]";
sub unblock_sub(&) {
--- Coro-6.57/Coro/AnyEvent.pm.orig 2021-06-21 15:43:04.005609656 +0000
+++ Coro-6.57/Coro/AnyEvent.pm 2021-06-21 15:44:19.829927486 +0000
@@ -217,7 +217,7 @@
# do the inefficient thing ourselves
Coro::_set_readyhook \&_activity;
- $IDLE = new Coro sub {
+ $IDLE = Coro->new(sub {
my $_poll = AnyEvent->can ("_poll")
|| AnyEvent->can ("one_event"); # AnyEvent < 6.0
@@ -225,7 +225,7 @@
$_poll->();
Coro::schedule if Coro::nready;
}
- };
+ });
$IDLE->{desc} = "[AnyEvent idle process]";
$Coro::idle = $IDLE;
--- Coro-6.57/Event/Event.pm.orig 2021-06-21 15:45:22.861697833 +0000
+++ Coro-6.57/Event/Event.pm 2021-06-21 15:45:54.173590215 +0000
@@ -190,12 +190,12 @@
}
# very inefficient
-our $IDLE = new Coro sub {
+our $IDLE = Coro->new(sub {
while () {
Event::one_event;
Coro::schedule if Coro::nready;
}
-};
+});
$IDLE->{desc} = "[Event idle thread]";
$Coro::idle = $IDLE;
--- Coro-6.57/Coro/Handle.pm.orig 2021-06-21 15:47:04.749093711 +0000
+++ Coro-6.57/Coro/Handle.pm 2021-06-21 15:47:39.171876058 +0000
@@ -77,7 +77,7 @@
=cut
sub unblock($) {
- new_from_fh Coro::Handle $_[0]
+ Coro::Handle->new_from_fh($_[0]);
}
=item $fh->writable, $fh->readable
--- Coro-6.57/EV/EV.pm.orig 2021-06-21 15:48:55.018193100 +0000
+++ Coro-6.57/EV/EV.pm 2021-06-21 15:49:18.850350072 +0000
@@ -66,12 +66,12 @@
XSLoader::load __PACKAGE__, $VERSION;
}
-our $IDLE = new Coro sub {
+our $IDLE = Coro->new(sub {
while () {
&_loop_oneshot;
Coro::schedule if Coro::nready;
}
-};
+});
$IDLE->{desc} = "[EV idle thread]";
$Coro::idle = $IDLE;