ericmoritz / wsdemo

A Cowboy Websocket demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

erlang timer:sleep/1 granularity

aglyzov opened this issue · comments

According to this http://erlang.org/pipermail/erlang-questions/2007-March/025678.html
the erlang timer:sleep/1 function sleeps at least 10 msec -- so the client establish
new connections at a lower pace (x10 slower than the code intends).

Now I am not saying this is bad, actually I found this when I wanter to increase the delay before
each new connection.

It is worth redoing on the actual hardware. It is 5 years ago and much has happened in Erlang since that time. It is a good catch though!

That sleep is actually vestigial. I originally had a 100ms sleep when I first wrote it.