I have a thread that listens to the http requests. I read the requests in my thread, then push the requests into a thread-safe buffer. The main thread every tick reads requests from the buffer, handle them in the main thread and generate a response that is pushed into another buffer, where the new buffer is cleaned by the server thread every tick of the server thread. The server thread shall write the generated response to the saved sockets and close the socket. Is this thread-safe and good?