Skip to content

Commit

Permalink
Set up return type before flagging we're set up.
Browse files Browse the repository at this point in the history
Fixes a race condition when multiple threads use a native callsite
for the first time.
  • Loading branch information
jnthn committed Nov 9, 2016
1 parent a1d8e93 commit 49fd825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/NativeCall.pm6
Expand Up @@ -313,8 +313,8 @@ my role Native[Routine $r, $libname where Str|Callable|List] {
nqp::unbox_s($conv), # calling convention
$arg_info,
return_hash_for($r.signature, $r, :$!entry-point));
$!setup = 1;
$!rettype := nqp::decont(map_return_type($r.returns));
$!setup = 1;
}
}

Expand Down

0 comments on commit 49fd825

Please sign in to comment.