-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flag to control asset versioning when getting write access #727
base: main
Are you sure you want to change the base?
Add flag to control asset versioning when getting write access #727
Conversation
|
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #727 +/- ##
=======================================
Coverage 38.15% 38.15%
=======================================
Files 99 99
Lines 6576 6576
=======================================
Hits 2509 2509
Misses 4067 4067 ☔ View full report in Codecov by Sentry. |
This PR should also add a method used to bump the version manually, but I'm not sure how we would do this. Maybe we should add a third locking function, instead of adding an argument to the existing one. E.g.: auto assetWrite = assets->potentialWrite(asset);
/* ... potentially do changes, just like before */
if (modified)
{
// consumes the assetWrite lock, unlocking the asset, but before that, increments the asset's version.
assets->confirmWrite(std::move(assetWrite));
} The thing is, currently Maybe instead of making it an alias, we could make it a child class of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to request changes!
Description
Added a flag to
Assets::write
in order to control whether the version of assets should be incremented when getting write access.Checklist