Deepa Remesh wrote: > > Bryan, thanks for bringing this up. Please see if the following is okay: > > If we add back CLSQRY to the finalize call, we need to have > synchronization around the code where we send CLSQRY to network server > and read server's reply. This synchronization is to ensure we wait for > the correct reply. It does not change the state of any objects, So I > think it is okay for it to be there in the finalizer. If anyone has > other opinions, please share your thoughts.
Waiting in the finalizer for a server response doesn't seem like a great idea to me. The worst case is the server is down or slow and we block there for a significant portion of time. Even in the best case of a fast response the finalizer is still blocking the finalizer thread, potentially stalling the JVM. Dan.