Crash when shutdown the app #1121
-
Hi, sorry for too many questions, but I‘m struggling to shut down the app, first I got a crash when shutdown my app, then I copy the sample code at the bottom of this issue #1050 from @vidcentum (thank you :) ), but have the same issue, attached the screenshot, I'm using windows 10 (version 2004, 64bit), VS2019, 16.7.7. In that sample code, I've just added a function called closeListenSocket, then when I want to shut down the app, I called this function on each thread listen socket, the crash appears, I think it's my wrong usage? Thanks
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
in us_internal_loop_unlink function, we maybe need to check the context->prev is empty or not before unlink:
|
Beta Was this translation helpful? Give feedback.
-
Well okay the manual doesn't mention that much about threading other than things are single threaded. But this is immensely important to follow. You are breaking this over and over. The only function that is thread safe is Loop::defer. All other functions are not thread safe. |
Beta Was this translation helpful? Give feedback.
Well okay the manual doesn't mention that much about threading other than things are single threaded. But this is immensely important to follow. You are breaking this over and over. The only function that is thread safe is Loop::defer. All other functions are not thread safe.