Commit bed615d
committed
fix(any_spawner): use spawner handle
This commits fix a panic that could arrive because of
conflicting borrowing of the `LOCAL_POOL`.
When `.run()` is executed, it mut borrows the LocalPool
for the whole duration of the Task which means, any
call to `Executor::spawn` by ran Futures would make
the `RefCell` panics.
Signed-off-by: Enzo "raskyld" Nocera <[email protected]>1 parent 7aaddb0 commit bed615d
1 file changed
+31
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
265 | 268 | | |
266 | 269 | | |
267 | 270 | | |
| 271 | + | |
268 | 272 | | |
269 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
270 | 282 | | |
271 | 283 | | |
272 | | - | |
273 | | - | |
274 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
275 | 290 | | |
276 | 291 | | |
277 | 292 | | |
278 | 293 | | |
279 | 294 | | |
280 | | - | |
281 | | - | |
282 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
283 | 301 | | |
284 | 302 | | |
285 | 303 | | |
286 | 304 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
294 | 311 | | |
295 | 312 | | |
296 | 313 | | |
| |||
0 commit comments