Skip to content

Commit

Permalink
fixup shutdown api doc and changelog (#617)
Browse files Browse the repository at this point in the history
add api doc on Realm.shutdown and  a changelog entry
  • Loading branch information
blagoev authored May 31, 2022
1 parent 2258d9a commit 1618d9d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* Support setting logger on Realm class. Default is to print info message or worse to the console. ([#583](https://github.com/realm/realm-dart/pull/583))
* Support SyncErrorHandler in FlexibleSyncConfiguration. ([#577](https://github.com/realm/realm-dart/pull/577))
* Support SyncClientResetHandler in FlexibleSyncConfiguration. ([#608](https://github.com/realm/realm-dart/pull/608))
* [Dart] Added `Realm.Shutdown` method to allow normal process exit in Dart applications. ([#617](https://github.com/realm/realm-dart/pull/617))


### Fixed
Expand Down
1 change: 0 additions & 1 deletion lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
////////////////////////////////////////////////////////////////////////////////
import 'dart:io';

import 'package:logging/logging.dart';
import 'package:meta/meta.dart';

import '../realm.dart';
Expand Down
1 change: 0 additions & 1 deletion lib/src/collections.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'realm_class.dart';
import 'native/realm_core.dart';

/// Contains index information about objects that moved within the same collection.
Expand Down
5 changes: 4 additions & 1 deletion lib/src/realm_class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,10 @@ class Realm {
..level = RealmLogLevel.info
..onRecord.listen((event) => print(event));

/// Shutdown.
/// Used to shutdown Realm and allow the process to correctly release native resources and exit.
///
/// Disclaimer: This method is mostly needed on Dart standalone and if not called the Dart probram will hang and not exit.
/// This is a workaround of a Dart VM bug and will be removed in a future version of the SDK.
static void shutdown() => scheduler.stop();
}

Expand Down

0 comments on commit 1618d9d

Please sign in to comment.