Skip to content

Commit

Permalink
Prepare for 10.14.0 (#2945)
Browse files Browse the repository at this point in the history
Co-authored-by: nirinchev <[email protected]>
  • Loading branch information
github-actions[bot] and nirinchev authored Jun 2, 2022
1 parent 699af67 commit e77b2de
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## vNext (TBD)
## 10.14.0 (2022-06-02)

### Enhancements
* Added a more efficient replacement for `Realm.WriteAsync`. The previous API would start a background thread, open the Realm there and run a synchronous write transaction on the background thread. The new API will asynchronously acquire the write lock (begin transaction) and asynchronously commit the transaction, but the actual write block will execute on the original thread. This means that objects/queries captured before the block can be used inside the block without relying on threadsafe references. Importantly, you can mix and match async and sync calls. And when calling any `Realm.WriteAsync` on a background thread the call is just run synchronously, so you should use `Realm.Write` for readability sake. The new API is made of `Realm.WriteAsync<T>(Func<T> function, CancellationToken cancellationToken)`, `Realm.WriteAsync(Action action, CancellationToken cancellationToken)`, `Realm.BeginWriteAsync(CancellationToken cancellationToken)` and `Transaction.CommitAsync(CancellationToken cancellationToken)`. While the `Transaction.Rollback()` doesn't need an async counterpart. The deprecated API calls are `Realm.WriteAsync(Action<Realm> action)`, `Real.WriteAsync<T>(Func<Realm, IQueryable<T>> function)`, `Realm.WriteAsync<T>(Func<Realm, IList<T>> function)` and `Realm.WriteAsync<T>(Func<Realm, T> function)`. Here is an example of usage:
Expand Down
2 changes: 1 addition & 1 deletion Realm/AssemblyInfo.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Product>Realm .NET</Product>
<VersionPrefix>10.13.0</VersionPrefix>
<VersionPrefix>10.14.0</VersionPrefix>
<Description Condition="'$(Description)' == ''">Realm is a mobile database: a replacement for SQLite</Description>
<Company>Realm Inc.</Company>
<Copyright>Copyright © $([System.DateTime]::Now.ToString(yyyy)) Realm Inc.</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion Realm/Realm.Unity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "io.realm.unity",
"version": "10.13.0",
"version": "10.14.0",
"displayName": "Realm",
"description": "Realm is an embedded mobile database for Unity",
"unity": "2021.1",
Expand Down

0 comments on commit e77b2de

Please sign in to comment.