[This is preliminary documentation and is subject to change.]
Provides a simple mechanism for exchanging messages with Erlang
processes or other instances of this class
System Object NFX DisposableObject NFX.Erlang ErlMboxNamespace: NFX.ErlangAssembly: NFX.Erlang (in NFX.Erlang.dll) Version: 3.0.0.1 (3.0.0.1)
public class ErlMbox : DisposableObject
public class ErlMbox : DisposableObject
Public Class ErlMbox
Inherits DisposableObject
Public Class ErlMbox
Inherits DisposableObject
public ref class ErlMbox : public DisposableObject
public ref class ErlMbox : public DisposableObject
type ErlMbox =
class
inherit DisposableObject
end
type ErlMbox =
class
inherit DisposableObject
end
Each mailbox is associated with a unique
ErlPid
that contains information necessary for delivery of messages.
When sending messages to named processes or mailboxes, the sender
pid is made available to the recipient of the message. When sending
messages to other mailboxes, the recipient can only respond if the
sender includes the pid as part of the message contents. The sender
can determine his own pid by calling
Self.
Mailboxes can be named, either at creation or later. Messages
can be sent to named mailboxes and named Erlang processes without
knowing the
ErlPid that identifies the mailbox.
This is neccessary in order to set up initial communication between
parts of an application. Each mailbox can have at most one name.
Messages to remote nodes are externalized for transmission, and
as a result the recipient receives a
copy of the original
C# object. To ensure consistent behaviour when messages are sent
between local mailboxes, such messages are cloned before delivery.
Additionally, mailboxes can be linked in much the same way as
Erlang processes. If a link is active when a mailbox is closed
any linked Erlang processes or ErlMbox's will be
sent an exit signal. As well, exit signals will be (eventually)
sent if a mailbox goes out of scope and its Dispose method called.
However due to the nature of
finalization (i.e. C# makes no guarantees about when Dispose
will be called) it is recommended that you
always explicitly close mailboxes if you are using links instead of
relying on finalization to notify other parties in a timely manner.
When retrieving messages from a mailbox that has received an exit
signal, an
ErlExit exception will be
raised. Note that the exception is queued in the mailbox along with
other messages, and will not be raised until it reaches the head of
the queue and is about to be retrieved