Skip to content

Commit

Permalink
Fix bug in FastFileInflator
Browse files Browse the repository at this point in the history
Needed to set the cleanHookAtomic reference to the cleanHook thread.
  • Loading branch information
Alex Aiezza authored and Alex Aiezza committed May 3, 2016
1 parent 447fd69 commit e13acc5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/edu/rit/flick/genetics/FastFileInflator.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ public File inflate( final Configuration configuration, final File fileIn, final

// Make cleaning hook
final Thread cleanHook = new Thread( () -> {
interrupted = true;
try
{
// Clean up IO
Expand All @@ -279,6 +280,8 @@ public File inflate( final Configuration configuration, final File fileIn, final
}
}, "Inflation_Cleaning_Thread" );

cleanHookAtomic.set( cleanHook );

Runtime.getRuntime().addShutdownHook( cleanHook );

inflateToDirectoryThread.start();
Expand Down

0 comments on commit e13acc5

Please sign in to comment.