Skip to content

Commit

Permalink
Remove harmless race
Browse files Browse the repository at this point in the history
  • Loading branch information
aronisstav committed Oct 12, 2017
1 parent 4ad1004 commit c20def7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/concuerror_callback.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,8 @@ hijack_or_wrap_system(Name, #concuerror_info{timeout = Timeout} = Info)
hijacked;
hijack_or_wrap_system(Name, Info) ->
#concuerror_info{processes = Processes} = Info,
Fun = fun() -> system_wrapper_loop(Name, whereis(Name), Info) end,
Wrapped = whereis(Name),
Fun = fun() -> system_wrapper_loop(Name, Wrapped, Info) end,
Pid = spawn_link(Fun),
ets:insert(Processes, ?new_system_process(Pid, Name, wrapper)),
wrapped.
Expand Down

0 comments on commit c20def7

Please sign in to comment.