Merge all other contributions

New features
Fix Windows bugs
I am not agree, because if both thread are not perfectly sync, you can lost or duplicate some date after a stop/start.