add rw_lock for windows, it not work well now