浏览代码

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 年前
父节点
当前提交
5d11a7c649
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. +1
    -4
      src/ibrowse_lb.erl

+ 1
- 4
src/ibrowse_lb.erl 查看文件

@ -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};

正在加载...
取消
保存