You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only the read thread is assigned a name in a WebSocketClient instance. The main Runnable acquires a default name like "Thread-7". I'm working on an application where I need to identify threads and manage them, and it would be nice to be able to distinguish them purely by name instead of inspecting their stack trace.
According to oakkitten who it pointed out in this thread, the connect() method creates a writeThread field which is overwritten with a new WebsocketWriteThread when the thread runs. WebsocketWriteThread sets the name, but the thread started in the connect() method continues to run with the default name.
Additionally oakkitten noted that a new Timer is created in AbstractWebSocket and it also lacks a name.
The text was updated successfully, but these errors were encountered:
Only the read thread is assigned a name in a
WebSocketClient
instance. The mainRunnable
acquires a default name like "Thread-7". I'm working on an application where I need to identify threads and manage them, and it would be nice to be able to distinguish them purely by name instead of inspecting their stack trace.According to
oakkitten
who it pointed out in this thread, theconnect()
method creates awriteThread
field which is overwritten with a newWebsocketWriteThread
when the thread runs.WebsocketWriteThread
sets the name, but the thread started in theconnect()
method continues to run with the default name.Additionally
oakkitten
noted that a newTimer
is created inAbstractWebSocket
and it also lacks a name.The text was updated successfully, but these errors were encountered: