… | |
… | |
62 | |
62 | |
63 | sub myfunc { |
63 | sub myfunc { |
64 | Coro::Multicore::scoped_enable; |
64 | Coro::Multicore::scoped_enable; |
65 | |
65 | |
66 | # from here to the end of this function, and in any functions |
66 | # from here to the end of this function, and in any functions |
67 | # callsed from this function, tasks will be executed asynchronously. |
67 | # called from this function, tasks will be executed asynchronously. |
68 | |
|
|
69 | } |
68 | } |
70 | |
69 | |
71 | =head1 API FUNCTIONS |
70 | =head1 API FUNCTIONS |
72 | |
71 | |
73 | =over 4 |
72 | =over 4 |
… | |
… | |
128 | |
127 | |
129 | TODO |
128 | TODO |
130 | |
129 | |
131 | =head1 BUGS |
130 | =head1 BUGS |
132 | |
131 | |
|
|
132 | =over 4 |
|
|
133 | |
|
|
134 | =item (OS-) threads are never released |
|
|
135 | |
133 | At the moment, threads that were created once will never be freed. They |
136 | At the moment, threads that were created once will never be freed. They |
134 | will be reused for asynchronous requests, though, so a slong as you limit |
137 | will be reused for asynchronous requests, though, so a slong as you limit |
135 | the maximum number of concurrent asynchronous tasks, this will also limit |
138 | the maximum number of concurrent asynchronous tasks, this will also limit |
136 | the maximum number of threads created. |
139 | the maximum number of threads created. |
137 | |
140 | |
138 | Future versions will likely lift this limitation. |
141 | Future versions will likely lift this limitation. |
139 | |
142 | |
|
|
143 | =item AnyEvent is initalised on module load |
|
|
144 | |
|
|
145 | AnyEvent is initialised on module load, as opposed to at a later time. |
|
|
146 | |
|
|
147 | Future versions will likely change this. |
|
|
148 | |
|
|
149 | =back |
|
|
150 | |
140 | =head1 AUTHOR |
151 | =head1 AUTHOR |
141 | |
152 | |
142 | Marc Lehmann <schmorp@schmorp.de> |
153 | Marc Lehmann <schmorp@schmorp.de> |
143 | http://software.schmorp.de/pkg/AnyEvent-XSThreadPool.html |
154 | http://software.schmorp.de/pkg/AnyEvent-XSThreadPool.html |
144 | |
155 | |
|
|
156 | Additional thanks to Zsbán Ambrus, who gave considerable desing input for |
|
|
157 | this module and the perl multicore specification. |
|
|
158 | |
145 | =cut |
159 | =cut |
146 | |
160 | |
147 | 1 |
161 | 1 |
148 | |
162 | |