<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 6, 2014 at 3:12 PM, Bin Wang <span dir="ltr"><<a href="mailto:wbin00@gmail.com" target="_blank">wbin00@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1ii" class="a3s" style="overflow:hidden">And for "block the actor", I didn't mean the messages passing are not<br>


asynced. But if we write a "handle_call" in a "gen_server" that takes<br>
a long time to compute things for example. Then the other requests<br>
behind this long time request are blocked (if it wants to get some<br>
information from the "gen_server").</div></blockquote></div><br>No. Not necessarily. You could return {noreply, State} in your handle_call/3 and then spawn a background worker to do the processing. When data comes back you can respond with gen_server:reply(From, Result). This avoids the "head of line blocking".</div>

<div class="gmail_extra"><br><br clear="all"><div><br></div>-- <br>J.
</div></div>