You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At https://github.com/imglib/imglib2-algorithm-gpl/ we see how the constructor invokes FFTConvolution.setExecutorService( service ) which works fine as long as the service is not null. When null, setExecutorService( service ) will create a new ExecutorService that will never be shutdown.
Upon repeated instantiation of FFTConvolution, the non-shutdown ExecutorService accummulates native memory, which can be seen as an accumulation of suspended threads, and eventually the JVM runs out of it.
The solution: a flag should be set when FFTConvolution instantiates a new ExecutorService, so that, upon completion of the main method convolve doing all the work, the service is shutdown().
Then, upon re-invokation of convolve, if the service is shutdown it should be reinstantiated--so this check should be done always at the beginning of convolve by asking ExecutorService.isShutdown(). Or it should thrown an error.
The text was updated successfully, but these errors were encountered:
At https://github.com/imglib/imglib2-algorithm-gpl/ we see how the constructor invokes
FFTConvolution.setExecutorService( service )
which works fine as long as the service is not null. When null,setExecutorService( service )
will create a newExecutorService
that will never be shutdown.Upon repeated instantiation of
FFTConvolution
, the non-shutdownExecutorService
accummulates native memory, which can be seen as an accumulation of suspended threads, and eventually the JVM runs out of it.The solution: a flag should be set when
FFTConvolution
instantiates a newExecutorService
, so that, upon completion of the main methodconvolve
doing all the work, the service isshutdown()
.Then, upon re-invokation of
convolve
, if the service is shutdown it should be reinstantiated--so this check should be done always at the beginning ofconvolve
by askingExecutorService.isShutdown()
. Or it should thrown an error.The text was updated successfully, but these errors were encountered: