NAME
Zing::Mailbox - Process Mailbox
ABSTRACT
Interprocess Communication Mechanism
SYNOPSIS
DESCRIPTION
This package provides represents a process mailbox, the default mechanism of interprocess communication.
INHERITS
This package inherits behaviors from:
LIBRARIES
This package uses type constraints from:
ATTRIBUTES
This package has the following attributes:
name
name(Str)
This attribute is read-only, accepts (Str)
values, and is optional.
METHODS
This package implements the following methods:
recv
recv
() : Maybe[HashRef]
The recv method receives a single new message from the mailbox.
- recv example #2
-
# given: synopsis
$mailbox
->
send
(
$mailbox
->term, {
status
=>
'hello'
});
$mailbox
->
recv
;
reply
reply(HashRef
$message
, HashRef
$value
) : Int
The reply method sends a message to the mailbox represented by the $bag
received and returns the size of the recipient mailbox.
-
# given: synopsis
$mailbox
->
send
(
$mailbox
->term, {
status
=>
'hello'
});
my
$message
=
$mailbox
->
recv
;
$mailbox
->reply(
$message
, {
status
=>
'thank you'
});
send
send
(Str
$key
, HashRef
$value
) : Int
The send method sends a new message to the mailbox specified and returns the size of the recipient mailbox.
size
size() : Int
The size method returns the message count of the mailbox.
AUTHOR
Al Newkirk, awncorp@cpan.org
LICENSE
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".