[erlang-questions] Sending messages to a process from the port driver from a separate thread

18 views
Skip to first unread message

Zhemzhitsky Sergey

unread,
Aug 1, 2012, 2:47:59 AM8/1/12
to erlang-q...@erlang.org

Hi erlang gurus,

 

Is it legal to send messages to any erlang process by means of driver_send_term from a separate thread started by erl_drv_thread_create?

I.e. can I send messages to the process not from the port driver callback, but at any time from the function specified when invoking erl_drv_thread_create?

 

Best Regards,

Sergey

 

_______________________________________________________

 

The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia.

If you need assistance please contact our Contact Center (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp

 

Lukas Larsson

unread,
Aug 8, 2012, 5:46:07 AM8/8/12
to Zhemzhitsky Sergey, erlang-q...@erlang.org
Hi!

I'm no expert on the code in question, but after a brief look in
io.c:driver_deliver_term it would seem that you can do it from not
only scheduler threads, given that you are using the SMP emulator.

Lukas
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Reply all
Reply to author
Forward
0 new messages