diff options
author | James Wheare <[email protected]> | 2012-09-25 15:23:55 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-10-01 11:47:56 +0200 |
commit | 79ce4791a326b15bec80e1a3870136548419a212 (patch) | |
tree | 2296a5ec233e57ae09aac3291ec49555fb3a000b /lib/ssl/src | |
parent | af9a8a011fd06ae54187bae73192c52495090933 (diff) | |
download | otp-79ce4791a326b15bec80e1a3870136548419a212.tar.gz otp-79ce4791a326b15bec80e1a3870136548419a212.tar.bz2 otp-79ce4791a326b15bec80e1a3870136548419a212.zip |
mnesia: Use chained send_after instead of send_interval
timer:send_interval behaves badly when resuming from sleep on some
platforms. For example, if I sleep for 10 minutes, and have a
send_interval running once per minute, when I resume, 10 messages
will be sent immediately, eliminating the benefit of only running
the work periodically. This is admittedly a separate bug with
send_interval, but the workaround is straightforward, and also
protects from messages piling up in the queue when the work takes
longer than the interval.
This patch fixes piled up error reports on resume from sleep:
** WARNING ** Mnesia is overloaded: {dump_log, write_threshold}
You'll still be warned if mnesia is overloaded, just not repeatedly.
Additionally, erlang:send_after is more efficient than using the
timer module equivalent [1]
[1] http://www.erlang.org/doc/efficiency_guide/commoncaveats.html#id57251
Diffstat (limited to 'lib/ssl/src')
0 files changed, 0 insertions, 0 deletions