Shutdown the Ganga session.
@param should_wait_cb: A callback function with the following signature
should_wait_cb(total_time, critical_thread_ids, non_critical_thread_ids)
where
total_time is the time in seconds since shutdown started
critical_thread_ids is a list of alive critical thread names
non_critical_thread_ids is a list of alive non-critical threads names.
and
return value is evaluated as a boolean.
A shutdown thread is started that calls stop() on each GangaThread and
waits for them all to die. A loop waits for the shutdown thread to
die, periodically calling the should_wait_cb function to ask if it
should continue to wait or shutdown anyway.
|