Hello. I need a Subject to be able to do a process.send . I created an actor and registered it with a name (process.register(subject, "A")). In another actor, I retrieved the pid of this process using process.named("A") . However, in order to send a message ,I need a subject. How would I get a Subject to process "A" if all I have is a pid? There is no process.subject_from_pid function! In erlang, one can simply send a message using a name. Thanks.
#getting subject for a Process
1 messages · Page 1 of 1 (latest)
You cannot do this.
You can send a message using Erlang's untyped API via the name, but it will be untyped.
Names are possibly-uninitialised, untyped, global, mutable variables
And they have the disadvantages those have in any other language.
ok. good to know. I will look into injecting a process with Subjects of other processes (perhaps using a coordinator process of sorts).
We may add an API for this in future, but due to it being impossible to implement in a type safe way we're exploring other avenues first