Commit d490308
Use detached std::thread instead of WorkerEnqueue for accessor deletion
BinaryNinja's worker threads are meant for analysis tasks. Use a plain
detached thread instead for deferring the m_accessor deletion off the
event thread.
Also expanded the comment to document the race condition root cause:
Destroy() can remove the global array ref between SetConnectionStatus
(NotConnected) and the accessor deletion, making the accessor's DbgRef
the last reference to the controller.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent dc76983 commit d490308
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1875 | 1875 | | |
1876 | 1876 | | |
1877 | 1877 | | |
1878 | | - | |
| 1878 | + | |
1879 | 1879 | | |
1880 | | - | |
1881 | | - | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
1882 | 1887 | | |
1883 | 1888 | | |
1884 | | - | |
| 1889 | + | |
1885 | 1890 | | |
1886 | 1891 | | |
1887 | 1892 | | |
| |||
0 commit comments