File tree Expand file tree Collapse file tree 6 files changed +17
-12
lines changed
pkgs/native_synchronization Expand file tree Collapse file tree 6 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ This repository is home to various Dart packages under the
7
7
8
8
| Package | Description | Version |
9
9
| ---| ---| ---|
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 ) |
10
11
11
12
## Publishing automation
12
13
Original file line number Diff line number Diff line change
1
+ ## 0.3.1
2
+
3
+ - Update the pubspec repository field to reflect the repo move.
4
+
1
5
## 0.3.0
2
6
3
7
- Add a closed state to ` Mailbox ` .
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ import 'dart:typed_data';
7
7
8
8
import 'package:ffi/ffi.dart' ;
9
9
10
- import 'package:native_synchronization/ primitives.dart' ;
11
- import 'package:native_synchronization/ sendable.dart' ;
10
+ import 'primitives.dart' ;
11
+ import 'sendable.dart' ;
12
12
13
13
final class _MailboxRepr extends Struct {
14
14
external Pointer <Uint8 > buffer;
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ import 'dart:ffi';
20
20
import 'dart:io' ;
21
21
22
22
import 'package:ffi/ffi.dart' ;
23
- import 'package:native_synchronization/sendable.dart' ;
24
23
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' ;
27
27
28
28
part 'posix.dart' ;
29
29
part 'windows.dart' ;
Original file line number Diff line number Diff line change 1
1
name : native_synchronization
2
2
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
5
5
6
6
environment :
7
7
sdk : " >=3.0.0 <4.0.0"
@@ -10,5 +10,5 @@ dependencies:
10
10
ffi : ^2.1.0
11
11
12
12
dev_dependencies :
13
- dart_flutter_team_lints : ^1 .0.0
13
+ dart_flutter_team_lints : ^3 .0.0
14
14
test : ^1.16.0
Original file line number Diff line number Diff line change @@ -25,13 +25,13 @@ void main() {
25
25
final mutex = sendableMutex.materialize ();
26
26
27
27
while (true ) {
28
- sleep (Duration (milliseconds: 10 ));
28
+ sleep (const Duration (milliseconds: 10 ));
29
29
if (mutex.runLocked (() {
30
30
if (ptr.value == 2 ) {
31
31
return true ;
32
32
}
33
33
ptr.value = 0 ;
34
- sleep (Duration (milliseconds: 500 ));
34
+ sleep (const Duration (milliseconds: 500 ));
35
35
ptr.value = 1 ;
36
36
return false ;
37
37
})) {
@@ -61,7 +61,7 @@ void main() {
61
61
})) {
62
62
break ;
63
63
}
64
- await Future .delayed (const Duration (milliseconds: 10 ));
64
+ await Future < void > .delayed (const Duration (milliseconds: 10 ));
65
65
}
66
66
expect (await helperResult, equals ('success' ));
67
67
});
@@ -109,7 +109,7 @@ void main() {
109
109
if (success) {
110
110
break ;
111
111
}
112
- await Future .delayed (const Duration (milliseconds: 20 ));
112
+ await Future < void > .delayed (const Duration (milliseconds: 20 ));
113
113
}
114
114
115
115
expect (await helperResult, equals ('success' ));
You can’t perform that action at this time.
0 commit comments