How can I pass a reference to a stack variable to a thread?
I’m writing a WebSocket server where a web client connects to play chess against a multithreaded computer AI. The WebSocket server wants to pass a Logger
object into the AI code. The Logger
object is going to pipe down log lines from the AI to the web client. The Logger
must contain a reference to the client connection.