def is_swapping():
 loader_lock.acquire()
 swapping = swap_event.in_process()
 loader_lock.release()
 return swapping

def is_swapping ( ) : loader_lock . acquire ( ) swapping = swap_event . in_process ( ) loader_lock . release ( ) return swapping
if the loader is currently being swapped :return: boolean .