Commit 7ccf62b
孙羽
Refactor RenderManager and RenderThread to include ticket cancellation and improve thread safety
- Add `CancelAllTickets` method to `RenderThread` to cancel all pending tickets.
- Update `RenderManager` destructor to cancel all tickets before stopping threads.
- Add checks for `decoder_cache_` in `ClearOldDecoders` and `CreateDecoder`.
- Improve thread safety in `StealFromOthers` by unlocking the mutex during `TrySteal`.1 parent ef404c0 commit 7ccf62b
4 files changed
Lines changed: 49 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
113 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
| |||
248 | 253 | | |
249 | 254 | | |
250 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
251 | 261 | | |
252 | 262 | | |
253 | 263 | | |
| |||
339 | 349 | | |
340 | 350 | | |
341 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
342 | 361 | | |
343 | 362 | | |
344 | 363 | | |
| |||
348 | 367 | | |
349 | 368 | | |
350 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
351 | 373 | | |
352 | 374 | | |
353 | 375 | | |
| |||
367 | 389 | | |
368 | 390 | | |
369 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
370 | 395 | | |
371 | 396 | | |
372 | 397 | | |
373 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
374 | 402 | | |
375 | 403 | | |
376 | 404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
395 | 406 | | |
396 | 407 | | |
397 | 408 | | |
| |||
0 commit comments