Dalamud icon indicating copy to clipboard operation
Dalamud copied to clipboard

Write configs asynchronously, first part of async API rewrite

Open goaaats opened this issue 2 years ago • 2 comments

Should fix some microstuttering complaints we have been getting. Reads aren't async yet, they definitely should be, but they should take the same code path as before the VFS in 99.9% of cases so it doesn't matter at the moment.

goaaats avatar Oct 30 '23 19:10 goaaats

To prevent double writes, any queued io operations should have a cancellation token before committing and care must be taken before creating a new write task to make sure that only one queued write exists at the same time. An example of that would be an older write operation overwriting a newer one if its thread had to be stalled for any reason

WorkingRobot avatar Oct 30 '23 21:10 WorkingRobot

To prevent double writes, any queued io operations should have a cancellation token before committing and care must be taken before creating a new write task to make sure that only one queued write exists at the same time. An example of that would be an older write operation overwriting a newer one if its thread had to be stalled for any reason

Are you referring to something specific, or are you saying that the system should handle this?

I'm waiting for these tasks in the two spots I'm using this now before kicking off another, so this shouldn't be an issue, error handling isn't great but I wanted to get this in for the patch. I'll go over it again when this is going to be a public API.

goaaats avatar Oct 31 '23 09:10 goaaats