Commit 3d34c31
NavyThread: drain and destruct ScopedEventBaseThread first
Summary:
As discovered in the unit test https://fburl.com/testinfra/87ndzjg8, it seems that the segfault
could occur while destructing the worker thread, i.e., NavyThread of RegionManager if there are some
tasks are outstanding while accessing the mutex which is another member of NavyThread. This change
makes sure the ScopedEventBaseThread is destructed after draining any pending fibers before any
other member variables.
Reviewed By: therealgymmy
Differential Revision: D49707371
fbshipit-source-id: 3fcac297d759b70a061ceaee209bfac70f962b4b1 parent be1cff2 commit 3d34c31
File tree
1 file changed
+6
-4
lines changed1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | | - | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
74 | | - | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
0 commit comments