Hi all
I have previously been successful with creating a Web-socket server which managed the creation on web-sockets and seeing the threads being destroyed in Visual VM.
The current project is quite similar except that each web-socket connection is being added to a thread safe map, and when the connection is no longer valid, either the user closed the connection or it was not serviced (did not receive a ping from the client), it is removed from the map. This all appears to be be working except when I look at the thread handling in Visual VM, the threads are not being destroyed.
The basic structure is based on Erel's Web Chat, where there is a shared code module that handles the insertion and removal from the map.
Does anyone have any insights into this. In my previous project Erel explained that the thread is destroyed when there are no live references left, so there is no need for a class destruct method like in .NET etc.
Regards
John.
I have previously been successful with creating a Web-socket server which managed the creation on web-sockets and seeing the threads being destroyed in Visual VM.
The current project is quite similar except that each web-socket connection is being added to a thread safe map, and when the connection is no longer valid, either the user closed the connection or it was not serviced (did not receive a ping from the client), it is removed from the map. This all appears to be be working except when I look at the thread handling in Visual VM, the threads are not being destroyed.
The basic structure is based on Erel's Web Chat, where there is a shared code module that handles the insertion and removal from the map.
Does anyone have any insights into this. In my previous project Erel explained that the thread is destroyed when there are no live references left, so there is no need for a class destruct method like in .NET etc.
Regards
John.