Added ASAP thread termination using semaphores.
If thread fails to grab Kill semaphore, it will exit ASAP. This way if a handle is deleted the loading thread terminates gracefully without having to wait for loading to complete.