Hi CGS,<div><br></div><div>1 and 2 seems not to answer my question. Regarding 3, that's my question: we can send messages between nodes, but how can we do it if two shells are not started as nodes.</div><div><br></div>
<div><br></div><div>Regards,</div><div>Barco<br><br><div class="gmail_quote">On Tue, Nov 15, 2011 at 11:12 AM, CGS <span dir="ltr"><<a href="mailto:cgsmcmlxxv@gmail.com">cgsmcmlxxv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>

  
    
  
  <div text="#000000" bgcolor="#ffffff">
    Hi,<br>
    <br>
    First of all, if you want to send messages using pid's, there are
    few things to consider:<br>
    1. you can use either pid(0,32,0) or list_to_pid([0,32,0]);<br>
    2. you can use register to give human label to your process;<br>
    3. as far as I know, you cannot send messages using only the pid's
    if the processes are in different shells, you can use {Name,Node} or
    send/2,3.<div><div class="h5"><br>
    <br>
    <br>
    <br>
    On 11/15/2011 03:45 AM, Barco You wrote:
    </div></div><blockquote type="cite"><div><div class="h5">Dear Erlangers,
      <div><br>
      </div>
      <div><br>
      </div>
      <div>When I start two erl shells on the same machine, I got one
        shell with pid <0.30.0> and the other one with
        <0.32.0>, and if I send a message on the first shell:"
        list_to_pid("<0.32.0>") ! hello.", the second shell got
        nothing by calling "flush()" on it.</div>
      <div><br>
      </div>
      <div>However, we can still send messages between shells on the
        same machine by starting them as nodes:</div>
      <div>>erl -sname bar -setcookie barco                          
                                 >erl -sname foo -setcookie barco</div>
      <div>
        <div>Eshell V5.8.4  (abort with ^G)                            
                                      Eshell V5.8.4  (abort with ^G)</div>
      </div>
      <div>
        <div>(bar@youjie-nb)5> register(bar,self()).                
                                       (foo@youjie-nb)1>
          {'bar@youjie-nb',bar} ! "hello bar!".</div>
        <div>true                                                      
                                                 "hello bar!"</div>
        <div>(bar@youjie-nb)6> flush().</div>
        <div>
          <div>Shell got "hello bar!"</div>
          <div>
            ok</div>
        </div>
      </div>
      <div><br>
      </div>
      <div>I hope to know the difference between the twos ways of
        starting erlang shell. Can two shells (not as nodes) send each
        other messages? Will the two erlang VMs (I assume one VM for one
        shell) share the same schedulers/run-queues on every core or
        each one has its own schedulers/run-queues on every core? and
        what about the VMs for nodes?</div>
      <div><br>
      </div>
      <div>Any insight would be appreciated.</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>Best regards,</div>
      <div>Barco</div>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
erlang-questions mailing list
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>