开发者

Does getting a stack overflow only affect the thread it happened in?

开发者 https://www.devze.com 2023-04-10 21:25 出处:网络
To put it in context : So lets say I was playing an online game and I created a stack overflow. W开发者_如何学Pythonould that effect everyone on the server playing as well, or just me?If the JVM is on

To put it in context : So lets say I was playing an online game and I created a stack overflow. W开发者_如何学Pythonould that effect everyone on the server playing as well, or just me?


If the JVM is on your browser, definitely not.

On the server, a stack overflow will effectively kill the thread. If it is missing finally blocks the thread might die without releasing resources which could wedge the server after a while, but it should release all mutexes held due to synchonized blocks. Assuming the error is not handled, it will call the thead's ThreadUncaughtExceptionHandler which normally will not take down the server unless the server is doing work in the main thread, but an uncaught exception handler could be implemented to take down the server.


That depends on how the server is programmed; and what happens with the StackOverflow. If it is not catched it can affect the whole server.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号