Quellcode durchsuchen

Removed unneccessary safe_fixtable for ordered set

Via ets man page:
Note that for tables of the ordered_set type, safe_fixtable/2 is not
necessary as calls to first/1 and next/2 will always succeed
pull/123/head
benjaminplee vor 10 Jahren
Ursprung
Commit
5d11a7c649
1 geänderte Dateien mit 1 neuen und 4 gelöschten Zeilen
  1. +1
    -4
      src/ibrowse_lb.erl

+ 1
- 4
src/ibrowse_lb.erl Datei anzeigen

@ -224,10 +224,7 @@ code_change(_OldVsn, State, _Extra) ->
%%% Internal functions %%% Internal functions
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
find_best_connection(Tid, Max_pipe) -> find_best_connection(Tid, Max_pipe) ->
ets:safe_fixtable(Tid, true),
Res = find_best_connection(ets:first(Tid), Tid, Max_pipe),
ets:safe_fixtable(Tid, false),
Res.
find_best_connection(ets:first(Tid), Tid, Max_pipe).
find_best_connection('$end_of_table', _, _) -> find_best_connection('$end_of_table', _, _) ->
{error, retry_later}; {error, retry_later};

Laden…
Abbrechen
Speichern