[erlang-questions] problem while sending and receiving messages while threading otp modules with udp connection..

Bengt Kleberg <>
Wed Jan 10 13:13:21 CET 2007

On 2007-01-10 12:36, dinesh sundar wrote:
> Hi All
>              I have a *supervisor*, a *genserver*  which receives 
> messages through udp and a *gen fsm* module which sends the messages 
> using the same socket.
> The application *runs fine* when i start it the supervisor *without 
> using threads*..ie it is able to receive and send messages..

first i would like to mention that most people use the word ''threads'' 
to mean execution contexts that share memory. erlang processes do not 
share memory, so they are processes.

> But when i run the supervisor using threads i am unable to receive and 
> send message through gen server and gen fsm module respectively..

if you could scale down this supervisor to as few lines as possible 
(that still fail) and then post it, that would make it easier to help.

from your description i can only think of asking if you have taken into 
account the documentation for gen_udp that says:

''open(Port) -> {ok, Socket} | {error, Reason}

Associates a UDP port number (Port) with the calling process.''

ie, it is only the process that calls open/1 that will get the messages.

    EPO guidelines 1978: "If the contribution to the known art resides
    solely in a computer program then the subject matter is not
    patentable in whatever manner it may be presented in the claims."

More information about the erlang-questions mailing list