Threads

Is there a way to communicate between Node Thread/Render Thread and the Main thread? I am running a server on the main thread. I want to close the server from the Node/Render Thread.