… | |
… | |
38 | # monitoring |
38 | # monitoring |
39 | mon $port, $cb->(@msg) # callback is invoked on death |
39 | mon $port, $cb->(@msg) # callback is invoked on death |
40 | mon $port, $otherport # kill otherport on abnormal death |
40 | mon $port, $otherport # kill otherport on abnormal death |
41 | mon $port, $otherport, @msg # send message on death |
41 | mon $port, $otherport, @msg # send message on death |
42 | |
42 | |
|
|
43 | =head1 CURRENT STATUS |
|
|
44 | |
|
|
45 | AnyEvent::MP - stable API, should work |
|
|
46 | AnyEvent::MP::Intro - outdated |
|
|
47 | AnyEvent::MP::Kernel - WIP |
|
|
48 | AnyEvent::MP::Transport - mostly stable |
|
|
49 | |
|
|
50 | stay tuned. |
|
|
51 | |
43 | =head1 DESCRIPTION |
52 | =head1 DESCRIPTION |
44 | |
53 | |
45 | This module (-family) implements a simple message passing framework. |
54 | This module (-family) implements a simple message passing framework. |
46 | |
55 | |
47 | Despite its simplicity, you can securely message other processes running |
56 | Despite its simplicity, you can securely message other processes running |
… | |
… | |
50 | For an introduction to this module family, see the L<AnyEvent::MP::Intro> |
59 | For an introduction to this module family, see the L<AnyEvent::MP::Intro> |
51 | manual page. |
60 | manual page. |
52 | |
61 | |
53 | At the moment, this module family is severly broken and underdocumented, |
62 | At the moment, this module family is severly broken and underdocumented, |
54 | so do not use. This was uploaded mainly to reserve the CPAN namespace - |
63 | so do not use. This was uploaded mainly to reserve the CPAN namespace - |
55 | stay tuned! The basic API should be finished, however. |
64 | stay tuned! |
56 | |
65 | |
57 | =head1 CONCEPTS |
66 | =head1 CONCEPTS |
58 | |
67 | |
59 | =over 4 |
68 | =over 4 |
60 | |
69 | |
… | |
… | |
105 | |
114 | |
106 | =cut |
115 | =cut |
107 | |
116 | |
108 | package AnyEvent::MP; |
117 | package AnyEvent::MP; |
109 | |
118 | |
110 | use AnyEvent::MP::Base; |
119 | use AnyEvent::MP::Kernel; |
111 | |
120 | |
112 | use common::sense; |
121 | use common::sense; |
113 | |
122 | |
114 | use Carp (); |
123 | use Carp (); |
115 | |
124 | |
116 | use AE (); |
125 | use AE (); |
117 | |
126 | |
118 | use base "Exporter"; |
127 | use base "Exporter"; |
119 | |
128 | |
120 | our $VERSION = $AnyEvent::MP::Base::VERSION; |
129 | our $VERSION = $AnyEvent::MP::Kernel::VERSION; |
121 | |
130 | |
122 | our @EXPORT = qw( |
131 | our @EXPORT = qw( |
123 | NODE $NODE *SELF node_of _any_ |
132 | NODE $NODE *SELF node_of _any_ |
124 | resolve_node initialise_node |
133 | resolve_node initialise_node |
125 | snd rcv mon kil reg psub spawn |
134 | snd rcv mon kil reg psub spawn |