Allow user modules to finalize
@@ -501,6 +501,7 @@ namespace eval turbine {
proc finalize { } {
log "turbine finalizing"
+ turbine::final_cmds
mktemp_cleanup
turbine::c::finalize
if { [ info exists ::TURBINE_ADLB_COMM ] } {
@@ -621,6 +622,15 @@ namespace eval turbine {
eval $cmd
}
}
+
+ # Finalize user modules
+ proc final_cmds { } {
+ global turbine_final_cmds
+ if { ! [ info exists turbine_final_cmds ] } return
+ foreach cmd $turbine_final_cmds {
+ eval $cmd
+ }
+ }
}
# Local Variables:
