[erlang-questions] multi-threaded woes

Vlad Dumitrescu vladdu55@REDACTED
Tue Sep 19 08:49:12 CEST 2006


Hi again,

On 9/18/06, Bob Cowdery <Bob.Cowdery@REDACTED> wrote:
>I am having some trouble getting two C nodes which are both clients
and servers
>to connect both ways and not sure of the rules here. They both start listen
>threads and sit on accept. Node 1 does a connect on node 2 which is successful
>and sends it a message which it receives. Node 2 does a connect on Node 1 as
>Node 1 is now guaranteed to be up, which is successful from the connect side
>except Node 1 never comes off the accept so it never sees it.

IMHO erl_interface provides great support for building a
single-threaded C node. If you want it to be multithreaded, then
you're on your own (i.e. just as much as with any C application).

I never tried to do a double connect like you do. It is sufficient to
connect from one side and then you can send messages both ways.

Another possible issue might be that C nodes are primarily meant to
talk to Erlang nodes, not between themselves. So I'm not sure how well
a network of C nodes will function together. Maybe someone who tried
it can tell.

Checking out gtkNode seems a very good idea, especially if it covers
much of what your own gui nodes need to do.

good luck!
Vlad



More information about the erlang-questions mailing list