I would like to see something like an UML sequence diagram for the shutdown process that...
shows all methods that are being called starting from the user input in the console client,
highlights all LSP remote procedure calls with a color of your choice,
and has a "lifeline" for each (relevant) thread on the server and/or client and clearly shows when this thread exits.
If my overview is correct, we should have the following threads:
server-side
server main thread (main())
server thread listening for new clients (spawned in LaunchServer(), running in executor)
"stop" thread for the server (stopFromConsole())
a shutdown thread for each client running in CompletableFuture.supplyAsync within launchServer
Note: This is a questionable way to start a new thread, especially since you already have a thread pool names executor, that in which the new thread could be executed.
a listening thread for each client spawned by sLauncher.startListening() and running within executor
client-side (console client)
client main thread (main())
listening thread that receives and handles messages from the server, spawned with cLauncher.startListening(), running in executor
separate OMC process spawned by omc-java-api
here we are not interested about any internal threads, but just want to know if and when the OMC process itself is shut down
We should have one diagram for each shutdown-like command line options (option 89 and option 99). For simplicity, you may visualize synchronizations through a CompletableFuture or similar shared objects as message that is directly sent from one thread to another.
Moved this Issue from "In Progress" to "Active Sprint" so I can work on other Issues and take a little distance from the topic to return to it at another time more open minded :)
I would like to see something like an UML sequence diagram for the shutdown process that...
If my overview is correct, we should have the following threads:
main()
)LaunchServer()
, running inexecutor
)stopFromConsole()
)CompletableFuture.supplyAsync
withinlaunchServer
executor
, that in which the new thread could be executed.sLauncher.startListening()
and running withinexecutor
main()
)cLauncher.startListening()
, running inexecutor
We should have one diagram for each shutdown-like command line options (option 89 and option 99). For simplicity, you may visualize synchronizations through a
CompletableFuture
or similar shared objects as message that is directly sent from one thread to another.