Skip to content

Commit

Permalink
Use granderl
Browse files Browse the repository at this point in the history
  • Loading branch information
lpgauth committed Jun 14, 2016
1 parent a5839ce commit e274d21
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.beam
doc/README.md
erl_crash.dump
fprofx.*
Expand Down
Binary file modified bin/rebar3
Binary file not shown.
2 changes: 1 addition & 1 deletion include/shackle_internal.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
-define(DEFAULT_BACKLOG_SIZE, 1024).
-define(DEFAULT_IP, "127.0.0.1").
-define(DEFAULT_POOL_SIZE, 16).
-define(DEFAULT_POOL_STRATEGY, round_robin).
-define(DEFAULT_POOL_STRATEGY, random).
-define(DEFAULT_PROTOCOL, shackle_tcp).
-define(DEFAULT_RECONNECT, true).
-define(DEFAULT_RECONNECT_MAX, timer:minutes(2)).
Expand Down
13 changes: 12 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
{coveralls_coverdata, "_build/test/cover/eunit.coverdata"}.
{coveralls_service_name, "travis-ci"}.

{deps, [
{granderl, ".*",
{git, "https://github.com/lpgauth/granderl.git", {branch, "adgear"}}}
]}.

{edoc_opts, [
{app_default, "http://www.erlang.org/doc/man"},
{doclet, edown_doclet},
Expand All @@ -19,6 +24,11 @@
{platform_define, "19", 'UDP_HEADER'}
]}.

{plugins, [
{pc, ".*",
{git, "https://github.com/blt/port_compiler.git", {branch, "master"}}}
]}.

{profiles, [
{compile, [
{erl_opts, [
Expand All @@ -35,7 +45,8 @@
]},
{edoc, [
{deps, [
{edown, {git, "https://github.com/uwiger/edown.git", {tag, "0.7"}}}
{edown,
{git, "https://github.com/uwiger/edown.git", {tag, "0.7"}}}
]}
]},
{test, [
Expand Down
5 changes: 4 additions & 1 deletion rebar.lock
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
[].
[{<<"granderl">>,
{git,"https://github.com/lpgauth/granderl",
{ref,"2ccc96f29a34c5dc097d2e349f9ffe128bc7950d"}},
0}].
2 changes: 1 addition & 1 deletion src/shackle_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ lookup(Key, List, Default) ->
non_neg_integer().

random(N) ->
erlang:phash2({self(), os:timestamp()}, N).
granderl:xorshift_tls(N).

-spec random_element([term()]) ->
term().
Expand Down

0 comments on commit e274d21

Please sign in to comment.