slim icon indicating copy to clipboard operation
slim copied to clipboard

monitorContainerExit is just a huge go routine

Open D4N opened this issue 2 years ago • 1 comments

The function monitorContainerExit is just a huge anonymous function that gets called asynchronously: https://github.com/docker-slim/docker-slim/blob/d6220ea5f2b91ee44e557a75a4123a246da2d13e/pkg/app/master/container/execution.go#L412

This is quite confusing from an API/usage perspective, as this function stays running in the background. I would suggest to refactor it a little bit, so that itself has to be called via go monitorContainerExit making the asynchronous nature more obvious.

D4N avatar May 20 '22 08:05 D4N

yes, using a go routine to call monitorContainerExit or renaming it to startMonitorContainerExit will be good

kcq avatar Jun 22 '22 07:06 kcq

finally :) https://github.com/slimtoolkit/slim/commit/502a2e34109d6e39647eaa4f8a4320cdb2186c09

kcq avatar Jan 19 '23 03:01 kcq