ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP.pm
(Generate patch)

Comparing AnyEvent-MP/MP.pm (file contents):
Revision 1.9 by root, Sun Aug 2 15:47:04 2009 UTC vs.
Revision 1.10 by root, Sun Aug 2 18:05:43 2009 UTC

153 && undef $_; 153 && undef $_;
154 } 154 }
155 }; 155 };
156 156
157 $self 157 $self
158}
159
160=item $portid = create_miniport { }
161
162Creates a "mini port", that is, a port without much #TODO
163
164=cut
165
166sub create_miniport(&) {
167 my $cb = shift;
168 my $id = "$AnyEvent::MP::Base::UNIQ." . ++$AnyEvent::MP::Base::ID;
169
170 $AnyEvent::MP::Base::PORT{$id} = sub {
171 &$cb
172 and delete $AnyEvent::MP::Base::PORT{$id};
173 };
174
175 "$NODE#$id"
158} 176}
159 177
160package AnyEvent::MP::Port; 178package AnyEvent::MP::Port;
161 179
162=back 180=back

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines