Skip to content

Commit

Permalink
Pass :hint-affinity to create-socket when calling .listen
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiepi committed Oct 20, 2018
1 parent fdd8462 commit 163f6e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/IO/Socket/Async.pm6
Expand Up @@ -166,11 +166,11 @@ my class IO::Socket::Async {
$!close-vow.keep(True);
}

sub create-socket(Bool :$listening = False, :$scheduler = $*SCHEDULER --> Promise) {
sub create-socket(Bool :$listening = False, :$scheduler = $*SCHEDULER, Bool :$hint-affinity = False --> Promise) {
my Promise $p .= new;
my $v = $p.vow;
nqp::asyncsocket(
$scheduler.queue,
$scheduler.queue(:$hint-affinity),
-> Mu \socket, Mu \err {
if err {
$v.break: err;
Expand Down Expand Up @@ -244,7 +244,7 @@ my class IO::Socket::Async {
method tap(&emit, &done, &quit, &tap --> ListenSocket) {
my $lock := Lock::Async.new;
my $tap;
my $VMIO = await create-socket(:listening, :$!scheduler);
my $VMIO = await create-socket(:listening, :$!scheduler, :hint-affinity);
my int $finished = 0;
my Promise $socket-host .= new;
my Promise $socket-port .= new;
Expand Down

0 comments on commit 163f6e5

Please sign in to comment.