add memory barrier to notify monitor thread of copy threads finished

This commit is contained in:
Ryo Nakamura
2022-11-13 15:33:45 +09:00
parent 81a7fbd2d8
commit e9d5ceb462

View File

@@ -416,6 +416,7 @@ void mscp_copy_thread_cleanup(void *arg)
if (t->sftp) if (t->sftp)
ssh_sftp_close(t->sftp); ssh_sftp_close(t->sftp);
t->finished = true; t->finished = true;
__sync_synchronize();
} }
void *mscp_copy_thread(void *arg) void *mscp_copy_thread(void *arg)