Does getting a stack overflow only affect the thread it happened in?
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.
精彩评论