The MyEMR ActiveSync libraries have been modified to improve its multi-threaded synchronization techniques to close multiple listening threads in a strict order, for circumstances that a synchronization process is interrupted by the user by disconnecting