… | |
… | |
145 | # or socket watcher the calls $result_ready->broadcast |
145 | # or socket watcher the calls $result_ready->broadcast |
146 | # when the "result" is ready. |
146 | # when the "result" is ready. |
147 | |
147 | |
148 | $result_ready->wait; |
148 | $result_ready->wait; |
149 | |
149 | |
|
|
150 | GLOBALS |
|
|
151 | $AnyEvent::MODEL |
|
|
152 | Contains "undef" until the first watcher is being created. Then it |
|
|
153 | contains the event model that is being used, which is the name of |
|
|
154 | the Perl class implementing the model. This class is usually one of |
|
|
155 | the "AnyEvent::Impl:xxx" modules, but can be any other class in the |
|
|
156 | case AnyEvent has been extended at runtime (e.g. in *rxvt-unicode*). |
|
|
157 | |
|
|
158 | The known classes so far are: |
|
|
159 | |
|
|
160 | AnyEvent::Impl::Coro based on Coro::Event, best choise. |
|
|
161 | AnyEvent::Impl::Event based on Event, also best choice :) |
|
|
162 | AnyEvent::Impl::Glib based on Glib, second-best choice. |
|
|
163 | AnyEvent::Impl::Tk based on Tk, very bad choice. |
|
|
164 | AnyEvent::Impl::Perl pure-perl implementation, inefficient. |
|
|
165 | |
150 | WHAT TO DO IN A MODULE |
166 | WHAT TO DO IN A MODULE |
151 | As a module author, you should "use AnyEvent" and call AnyEvent methods |
167 | As a module author, you should "use AnyEvent" and call AnyEvent methods |
152 | freely, but you should not load a specific event module or rely on it. |
168 | freely, but you should not load a specific event module or rely on it. |
153 | |
169 | |
154 | Be careful when you create watchers in the module body - Anyevent will |
170 | Be careful when you create watchers in the module body - Anyevent will |