… | |
… | |
154 | # do something such as adding a timer |
154 | # do something such as adding a timer |
155 | # or socket watcher the calls $result_ready->broadcast |
155 | # or socket watcher the calls $result_ready->broadcast |
156 | # when the "result" is ready. |
156 | # when the "result" is ready. |
157 | |
157 | |
158 | $result_ready->wait; |
158 | $result_ready->wait; |
|
|
159 | |
|
|
160 | =back |
|
|
161 | |
|
|
162 | =head1 GLOBALS |
|
|
163 | |
|
|
164 | =over 4 |
|
|
165 | |
|
|
166 | =item $AnyEvent::MODEL |
|
|
167 | |
|
|
168 | Contains C<undef> until the first watcher is being created. Then it |
|
|
169 | contains the event model that is being used, which is the name of the |
|
|
170 | Perl class implementing the model. This class is usually one of the |
|
|
171 | C<AnyEvent::Impl:xxx> modules, but can be any other class in the case |
|
|
172 | AnyEvent has been extended at runtime (e.g. in I<rxvt-unicode>). |
|
|
173 | |
|
|
174 | The known classes so far are: |
|
|
175 | |
|
|
176 | AnyEvent::Impl::Coro based on Coro::Event, best choise. |
|
|
177 | AnyEvent::Impl::Event based on Event, also best choice :) |
|
|
178 | AnyEvent::Impl::Glib based on Glib, second-best choice. |
|
|
179 | AnyEvent::Impl::Tk based on Tk, very bad choice. |
|
|
180 | AnyEvent::Impl::Perl pure-perl implementation, inefficient. |
159 | |
181 | |
160 | =back |
182 | =back |
161 | |
183 | |
162 | =head1 WHAT TO DO IN A MODULE |
184 | =head1 WHAT TO DO IN A MODULE |
163 | |
185 | |