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
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
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+
15## 0.3.0
26
37- Add a closed state to ` Mailbox ` .
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ import 'dart:typed_data';
77
88import '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
1313final class _MailboxRepr extends Struct {
1414 external Pointer <Uint8 > buffer;
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ import 'dart:ffi';
2020import 'dart:io' ;
2121
2222import '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
2828part 'posix.dart' ;
2929part 'windows.dart' ;
Original file line number Diff line number Diff line change 11name : native_synchronization
22description : 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
66environment :
77 sdk : " >=3.0.0 <4.0.0"
@@ -10,5 +10,5 @@ dependencies:
1010 ffi : ^2.1.0
1111
1212dev_dependencies :
13- dart_flutter_team_lints : ^1 .0.0
13+ dart_flutter_team_lints : ^3 .0.0
1414 test : ^1.16.0
Original file line number Diff line number Diff 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' ));
You can’t perform that action at this time.
0 commit comments