Made use of StoppableThread

Hello. Nice meet you.  I speak english poorly.  Please consider accepting this pull.  Thank very much.