Selaa lähdekoodia

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 10 vuotta sitten
vanhempi
commit
5d11a7c649
1 muutettua tiedostoa jossa 1 lisäystä ja 4 poistoa
  1. +1
    -4
      src/ibrowse_lb.erl

+ 1
- 4
src/ibrowse_lb.erl Näytä tiedosto

@ -224,10 +224,7 @@ code_change(_OldVsn, State, _Extra) ->
%%% Internal functions
%%--------------------------------------------------------------------
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', _, _) ->
{error, retry_later};

Ladataan…
Peruuta
Tallenna