You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling syn with a non-existant scope will result in an error.
When an error happens in a console, the console thread is killed and it is replaced with a new one.
Now consider these two points and follow what you are doing. First, you register the console process. Then, you call syn:lookup(sers, "hedy")., an action that raises an error which causes that console process to die. Since the process died, it gets unregistered. The process in Pid is now dead.
Therefore, when you now call syn:lookup(users, "hedy"). you get undefined because, well, the original console process died. Same when you try to register Pid again: it is dead. You cannot register a dead process.
If you don't understand, just print out the value of self() after every operation and you'll see that it changes.
Hello, dears.
I am using version
3.3.0
. Suppose we add node to a scope like this:syn:add_node_to_scopes([users])
and register a process like this:If I then call
syn:lookup
with a non-existent scope name like this:I will get this error:
If I call
syn:lookup
with an existing scope like this:I will get
undefined
. If I try to registerPid
again, I will get the following error:Can you help me understand what is incorrect? Also, why is it that if we perform a lookup in a non-existent scope, all existing scopes will be missed?
The text was updated successfully, but these errors were encountered: