Commit dbf0984
Schedule CatalystInstanceImpl destruction using new thread (#41720)
Summary:
Pull Request resolved: #41720
We currently go via the UI thread, so we can use AsyncTask to schedule the final bit of async ReactContext destruction. This is a requirement for the AsyncTask API, which is also deprecated. We should figure out a better way to schedule and re-use threads across React Native Android, but until then, we can just create a new Thread here, which is also what we do for instance creation.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D51706689
fbshipit-source-id: cf17e20e91b195b956b1701e6d91d563fdba4d151 parent 847f5de commit dbf0984
File tree
1 file changed
+17
-24
lines changed- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge
1 file changed
+17
-24
lines changedLines changed: 17 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
374 | 373 | | |
375 | 374 | | |
376 | 375 | | |
377 | | - | |
378 | | - | |
379 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
380 | 379 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
401 | 394 | | |
402 | 395 | | |
403 | 396 | | |
| |||
0 commit comments