Skip to content
Permalink
Browse files

Remove 2 Scalar allocations from each Socket::Async.write

They're not needed, and reduce memory pressure in servers/clients.
  • Loading branch information...
lizmat committed Feb 15, 2019
1 parent 4a2124a commit eb8561ba107ccb6a344496af5afa74e791ebe560
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/IO/Socket/Async.pm6
@@ -27,8 +27,8 @@ my class IO::Socket::Async {
}

method write(IO::Socket::Async:D: Blob $b, :$scheduler = $*SCHEDULER) {
my $p = Promise.new;
my $v = $p.vow;
my $p := Promise.new;
my $v := $p.vow;
nqp::asyncwritebytes(
$!VMIO,
$scheduler.queue,

0 comments on commit eb8561b

Please sign in to comment.
You can’t perform that action at this time.