commons-exec icon indicating copy to clipboard operation
commons-exec copied to clipboard

[EXEC-121] Wait for async execution until process has started

Open Marcono1234 opened this issue 1 year ago • 0 comments

This also has the side effect of ensuring that the process destroyer, if any, is registered.

Have marked this as draft for now because I am not sure if this a good solution. It causes the following behavior differences (which might be acceptable though):

  • Longer delay for async execution because calling thread now has to wait until process is started
  • Fail-fast behavior might be unexpected for caller; might expect that failure is reported through ExecuteStreamHandler

Maybe the race condition reported in EXEC-121 could also be solved differently by having another shutdown hook which verifies that all processes are started and their process destroyers (if any) have been registered. Though this logic might be quite complicated.

Marcono1234 avatar Jan 06 '24 18:01 Marcono1234