Repository navigation
Fix race condition in event_subscriber.h - #11283
Conversation
7d493a1 to
189fe43
Compare
189fe43 to
68bceb9
Compare
|
I think we don't need the But there are crashes when emitting |
If I remember correctly, the SafePtr destructor always runs in the IO thread (since that's where URL jobs are destroyed), so it is possible that a "data" event is being emitted when URLJob is being destroyed (OnData handler cannot be executed).
Did you experience crashes with |
The root cause is the code is trying to access URLJob while it is being destroyed, so it is a race condition when accessing URLJob and we should fix it on URLJob's side, instead of working around it on EventSubscriber's side. I have created #11357 which uses weak pointer to avoid solving the race condition manually. |
|
Closed in favor of #11357 . |
|
I'm reopening this since this PR does fix the crash while #11357 still have some problems. |
|
Thanks @zcbenz. Later I plan to add more tests that exercise |
No description provided.