Skip to content

Commit 4151ca3

Browse files
authored
[native_synchronization] update pubspec metadata for the repo move (#5)
1 parent 0b826ab commit 4151ca3

File tree

6 files changed

+17
-12
lines changed

6 files changed

+17
-12
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This repository is home to various Dart packages under the
77

88
| Package | Description | Version |
99
|---|---|---|
10+
| [native_synchronization](pkgs/native_synchronization/) | Low level synchronization primitives built on dart:ffi. | [![pub package](https://img.shields.io/pub/v/native_synchronization.svg)](https://pub.dev/packages/native_synchronization) |
1011

1112
## Publishing automation
1213

pkgs/native_synchronization/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.1
2+
3+
- Update the pubspec repository field to reflect the repo move.
4+
15
## 0.3.0
26

37
- Add a closed state to `Mailbox`.

pkgs/native_synchronization/lib/mailbox.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import 'dart:typed_data';
77

88
import 'package:ffi/ffi.dart';
99

10-
import 'package:native_synchronization/primitives.dart';
11-
import 'package:native_synchronization/sendable.dart';
10+
import 'primitives.dart';
11+
import 'sendable.dart';
1212

1313
final class _MailboxRepr extends Struct {
1414
external Pointer<Uint8> buffer;

pkgs/native_synchronization/lib/primitives.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ import 'dart:ffi';
2020
import 'dart:io';
2121

2222
import 'package:ffi/ffi.dart';
23-
import 'package:native_synchronization/sendable.dart';
2423

25-
import 'package:native_synchronization/src/bindings/pthread.dart';
26-
import 'package:native_synchronization/src/bindings/winapi.dart';
24+
import 'sendable.dart';
25+
import 'src/bindings/pthread.dart';
26+
import 'src/bindings/winapi.dart';
2727

2828
part 'posix.dart';
2929
part 'windows.dart';
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: native_synchronization
22
description: Low level synchronization primitives built on dart:ffi.
3-
version: 0.3.0
4-
repository: https://github.com/dart-lang/native_synchronization
3+
version: 0.3.1
4+
repository: https://github.com/dart-lang/labs/tree/main/pkgs/native_synchronization
55

66
environment:
77
sdk: ">=3.0.0 <4.0.0"
@@ -10,5 +10,5 @@ dependencies:
1010
ffi: ^2.1.0
1111

1212
dev_dependencies:
13-
dart_flutter_team_lints: ^1.0.0
13+
dart_flutter_team_lints: ^3.0.0
1414
test: ^1.16.0

pkgs/native_synchronization/test/primitives_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ void main() {
2525
final mutex = sendableMutex.materialize();
2626

2727
while (true) {
28-
sleep(Duration(milliseconds: 10));
28+
sleep(const Duration(milliseconds: 10));
2929
if (mutex.runLocked(() {
3030
if (ptr.value == 2) {
3131
return true;
3232
}
3333
ptr.value = 0;
34-
sleep(Duration(milliseconds: 500));
34+
sleep(const Duration(milliseconds: 500));
3535
ptr.value = 1;
3636
return false;
3737
})) {
@@ -61,7 +61,7 @@ void main() {
6161
})) {
6262
break;
6363
}
64-
await Future.delayed(const Duration(milliseconds: 10));
64+
await Future<void>.delayed(const Duration(milliseconds: 10));
6565
}
6666
expect(await helperResult, equals('success'));
6767
});
@@ -109,7 +109,7 @@ void main() {
109109
if (success) {
110110
break;
111111
}
112-
await Future.delayed(const Duration(milliseconds: 20));
112+
await Future<void>.delayed(const Duration(milliseconds: 20));
113113
}
114114

115115
expect(await helperResult, equals('success'));

0 commit comments

Comments
 (0)