In a shutdown hook method, I need it to send a message to another process to say it has shutdown. My current message handling code requires that the message be written into a queue, this queue is processed by another thread and sent on to wherever it is going. In this case, to be written into a pipe file by another thread.
In a shutdown hook, can I guarantee that these threads will still be running? I have several shutdown hooks but these are all to handle other things that don't need other threads.
The execution is minimal. It will run about 15 lines of code + any wait needed to write into the file which should also be minimal.