Fix autosave during close
Fixes #1183
Block on source buffer async save instead of yield.
Thanks @jeremypw for taking a look... I've tried a few things but when I've gotten the autosave to apparently work the SourceFileSaver appears to be leaving around files like .goutputstream-HU28J1 as if the save hasn't completed even though we're "blocking" for the save_async () call... Any ideas? I've tried placing a call to Posix.sync () to see if it helps but it does not.
I'll see if I can come up with something.
Just pushed a draft PR that makes more deep-rooted changes to the saving logic (which seems rather tangled at the moment). Unfortunately the diff is larger so harder to get merged. Please see if you can find any regressions if you have time.
Thanks Jeremy! I'll take a look, probably this weekend.
Closing as the linked issue is marked closed by another PR.