PhotonLibOS icon indicating copy to clipboard operation
PhotonLibOS copied to clipboard

Close connection in different photon thread

Open damondd opened this issue 8 months ago • 1 comments

TCP connection is running in one photon thread, in a way of busy loop receiving and sending data and yield. Is it safe to close this connection from another photon thread (both photon threads are in the same vCPU) ? If not, what is the recommend way ?

damondd avatar Aug 05 '25 14:08 damondd

Please refer to photon::new_tcp_socket_pool. It is safe within one vCPU.

beef9999 avatar Aug 05 '25 14:08 beef9999