I voted to close this question: You asked for help with one issue: It hangs in
isExecutorsAvailable()
. The reason for that hang should be immediately obvious to anybody who reads the code, but besides that, I count five other reasons why this example cannot work at all, and four reasons why it might cause problems in a program that uses it, and nine other reasons why it should not pass even a casual code review. This is just not something that any other beginner needs to see, even if their problem somewhat matches the question that you asked. —
Solomon Slow 45 secs ago