bevy_save
bevy_save copied to clipboard
Correct file IO sync
As currently implemented there is a chance that saved file would be empty due to how actual writes are deferred in async world. The test included in PR ( in revision e4d613443363a48a8efe9d4c73c4077d11d6c807 ) can be used to check whether the issue reproduces in particular OS. For my Windows 11 setup, that test (if run without fix commit 175ceb6ed5851e488498a1ecfcb80b7403e56b85 ) would usually fail at 1st or 2nd iteration. With fix, 20 iterations are all ok and I'v also tried 2000 iterations which are finished ok as well.