On 23/06/2022 1:40 pm, Tony Harminc wrote:
[...]while (!stopped) { Thread.sleep(1000); } }Does this actually always sleep for the entire time, or is it somehow interrupted by the MODIFY command? In an ordinary MVS environment, one would write a command handling subtask, and when the main (or a worker) task waits for work, it waits on both the work ECB and the command-has-been-issued one. Or a we-are-shutting-down one. In this example it appears that the worker task/thread both waits for commands and does the work (the report).
The main thread sleeps for the entire 1000 milliseconds. The handleModify and handleStop methods are called on another thread from JZOS. It is possible to interrupt waiting/sleeping threads, but that kind of inter-thread communication gets more complicated. I was just trying to illustrate the setup for receiving STOP and MODIFY commands. -- Andrew Rowley Black Hill Software ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
