Skip to content

Commit

Permalink
Stash debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Oct 26, 2017
1 parent 4b60df8 commit e6d32de
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/core/Proc/Async.pm
Expand Up @@ -335,14 +335,24 @@ my class Proc::Async {
nqp::bindkey($callbacks, 'stdout_fd', $!stdout-fd) if $!stdout-fd.DEFINITE;
nqp::bindkey($callbacks, 'stderr_fd', $!stderr-fd) if $!stderr-fd.DEFINITE;

$!process_handle := nqp::spawnprocasync($scheduler.queue(:hint-affinity),
CLONE-LIST-DECONTAINERIZED($!path,@!args),
$cwd.Str,
CLONE-HASH-DECONTAINERIZED(%ENV),
my $q := $scheduler.queue;
%*ENV<ZZ> and say "ZZ0: $*THREAD.id() made q: " ~ $q.WHICH;
my $pargs := CLONE-LIST-DECONTAINERIZED($!path,@!args);
%*ENV<ZZ> and say "ZZ0: $*THREAD.id() made pargs: " ~ $pargs;
my $cwdstr := $cwd.Str;
%*ENV<ZZ> and say "ZZ0: $*THREAD.id() made cwdstr: $cwdstr.perl()";
my $envh := CLONE-HASH-DECONTAINERIZED(%ENV);
%*ENV<ZZ> and say "ZZ0: $*THREAD.id() made envh";
$!process_handle := nqp::spawnprocasync($q,
$pargs,
$cwdstr,
$envh,
$callbacks,
);
%*ENV<ZZ> and say "ZZ1: spawned";
$!handle_available_promise.keep(True);
nqp::permit($!process_handle, 0, -1) if $!merge_supply;
%*ENV<ZZ> and say "ZZ2: spawned";
Promise.allof( $!exit_promise, @!promises ).then({
.close for @!close-after-exit;
$!exit_promise.status == Broken
Expand Down
1 change: 1 addition & 0 deletions src/core/ThreadPoolScheduler.pm
Expand Up @@ -375,6 +375,7 @@ my class ThreadPoolScheduler does Scheduler {
$!affinity-workers := $workers;
scheduler-debug "Created initial affinity worker thread";
self!maybe-start-supervisor();
scheduler-debug "Started supervisor in affinity worker init";
return $!affinity-workers[0].queue;
}
}
Expand Down

0 comments on commit e6d32de

Please sign in to comment.