[erlang-questions] How to write a generic IRC client the OTP way?
Ale
peralta.alejandro@REDACTED
Sun Jul 3 05:55:15 CEST 2011
Hello Jon,
Thanks for your answer, sorry for the delay.
> Also, for synchronous calls (where you want the status), waiting the
> necessary amount of time is pretty much what you expect to do. You *can*
> make arrangements to use cast, and pass in a respond-to-PID parameter as
> part of the request, but in most cases, that adds significant extra
> complexity for very little benefit.
I think one of the problems I'm having is that I'm confusing
synchronous calls of erlang processes and the actual process of the
interpreter.
I was wondering if I make a synchronous call from a wx process to a
gen_server process (using gen_server:call for example) if the whole wx
application would block. For example, would I be able to click a
button mean while the call completes?
I suppose that depends on the application, wouldn't it? I mean if I
spawn another process to call gen_server the wx wouldn't block.
>
> Note that gen_server:call also takes a timeout parameter -- it defaults to
> 5,000 milliseconds, so if the gen_server is "wedged" then the timeout will
> kick in.
>
I'll see into it.
Thanks again for your answer,
--
Ale.
More information about the erlang-questions
mailing list