<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 6, 2012, at 2:38 PM, Tim Watson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On 6 February 2012 19:24, Jon Watte <span dir="ltr"><<a href="mailto:jwatte@gmail.com">jwatte@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That is interesting -- it might make it worth it to upgrade to R14.<br>
<br>
Also, we found a module called "gen_server2" that works around this<br>
problem by draining the message queue before calling any callback, and<br>
then dispatching messages based on this list of drained messages. Does<br>
anyone have experience with this module?<br>
<div class="im HOEnZb"><br>
</div></blockquote><div><br></div><div>It is part of rabbitmq, which I'm guessing it's reasonable to call *fairly stable and production worthy* lol. I keep a copy as a standalone OTP library application on github, which I update/synchronise periodically with updates from the rabbit hg/git repository. I haven't refreshed it in a while, as we're largely >= R14 now, but I find this approach (of bundling it as a standalone library app) works nicely for making it available across projects, though I'm less reliant on it now as I'm not using the extra features it provides in addition to message queue draining.</div></div></blockquote><br></div><div>I wish there was an "official" standalone version of gen_server2. Rabbitmq includes it, the Erlang rabbitmq client includes it as well, riak_core too plus a variety of individuals like Tim have created standalone versions based on one of the above. If one attempts to combine, say, riak_core with the rabbitmq erlang client, frustration ensues.</div><div><br></div><div>Mihai</div><div><br></div></body></html>