Execute NIF calls on non-scheduler threads asynchronously #6
1 changed files with 10 additions and 1 deletions
|
@ -296,7 +296,14 @@ fold_objects(FoldObjectsFun, Acc, Opts, #state{connection=Connection, table=Tabl
|
|||
{break, AccFinal} ->
|
||||
AccFinal
|
||||
after
|
||||
ok = wterl:cursor_close(Cursor)
|
||||
case wterl:cursor_close(Cursor) of
|
||||
ok ->
|
||||
ok;
|
||||
{error, {eperm, _}} -> %% TODO: review/fix
|
||||
ok;
|
||||
{error, _}=E ->
|
||||
E
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
@ -313,6 +320,8 @@ drop(#state{connection=Connection, table=Table}=State) ->
|
|||
case wterl:drop(Connection, Table) of
|
||||
ok ->
|
||||
{ok, State};
|
||||
{error, {ebusy, _}} -> %% TODO: review/fix
|
||||
{ok, State};
|
||||
Error ->
|
||||
{error, Error, State}
|
||||
end.
|
||||
|
|
Loading…
Reference in a new issue