Execute NIF calls on non-scheduler threads asynchronously #6
1 changed files with 3 additions and 4 deletions
|
@ -69,8 +69,7 @@
|
||||||
-ifdef(TEST).
|
-ifdef(TEST).
|
||||||
-ifdef(EQC).
|
-ifdef(EQC).
|
||||||
-include_lib("eqc/include/eqc.hrl").
|
-include_lib("eqc/include/eqc.hrl").
|
||||||
-define(QC_OUT(P),
|
-define(QC_OUT(P), eqc:on_output(fun(Str, Args) -> io:format(user, Str, Args) end, P)).
|
||||||
eqc:on_output(fun(Str, Args) -> io:format(user, Str, Args) end, P)).
|
|
||||||
-endif.
|
-endif.
|
||||||
-include_lib("eunit/include/eunit.hrl").
|
-include_lib("eunit/include/eunit.hrl").
|
||||||
-endif.
|
-endif.
|
||||||
|
@ -120,8 +119,8 @@ conn_open(HomeDir, Config) ->
|
||||||
conn_open_nif(_AsyncRef, _HomeDir, _Config) ->
|
conn_open_nif(_AsyncRef, _HomeDir, _Config) ->
|
||||||
?nif_stub.
|
?nif_stub.
|
||||||
|
|
||||||
-spec conn_close(connection()) -> ok | {error, term()}.
|
-spec connection_close(connection()) -> ok | {error, term()}.
|
||||||
conn_close(ConnRef) ->
|
connection_close(ConnRef) ->
|
||||||
?ASYNC_NIF_CALL(fun conn_close_nif/2, [ConnRef]).
|
?ASYNC_NIF_CALL(fun conn_close_nif/2, [ConnRef]).
|
||||||
|
|
||||||
-spec conn_close_nif(reference(), connection()) -> ok | {error, term()}.
|
-spec conn_close_nif(reference(), connection()) -> ok | {error, term()}.
|
||||||
|
|
Loading…
Reference in a new issue