File tree 4 files changed +43
-0
lines changed
4 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2024 Contributors to the Eclipse Foundation
2
+ //
3
+ // See the NOTICE file(s) distributed with this work for additional
4
+ // information regarding copyright ownership.
5
+ //
6
+ // This program and the accompanying materials are made available under the
7
+ // terms of the Apache Software License 2.0 which is available at
8
+ // https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
9
+ // which is available at https://opensource.org/licenses/MIT.
10
+ //
11
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
12
+
13
+ use super :: TriggerId ;
14
+
15
+ pub trait IdTracker < Id : TriggerId > {
16
+ fn set ( & self , id : Id ) ;
17
+ fn reset_next ( & self ) -> Id ;
18
+ fn reset_all < F : FnMut ( Id ) > ( & self , callback : F ) ;
19
+ }
Original file line number Diff line number Diff line change 10
10
//
11
11
// SPDX-License-Identifier: Apache-2.0 OR MIT
12
12
13
+ pub mod id_tracker;
13
14
pub mod process_local;
15
+ pub mod signal;
14
16
pub mod unix_datagram_socket;
15
17
16
18
use std:: { fmt:: Debug , time:: Duration } ;
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2024 Contributors to the Eclipse Foundation
2
+ //
3
+ // See the NOTICE file(s) distributed with this work for additional
4
+ // information regarding copyright ownership.
5
+ //
6
+ // This program and the accompanying materials are made available under the
7
+ // terms of the Apache Software License 2.0 which is available at
8
+ // https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
9
+ // which is available at https://opensource.org/licenses/MIT.
10
+ //
11
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
12
+
13
+ use std:: time:: Duration ;
14
+
15
+ use super :: { ListenerWaitError , NotifierNotifyError } ;
16
+
17
+ pub trait SignalMechanism {
18
+ fn notify ( & self ) -> Result < ( ) , NotifierNotifyError > ;
19
+ fn try_wait ( & self ) -> Result < ( ) , ListenerWaitError > ;
20
+ fn timed_wait ( & self , timeout : Duration ) -> Result < ( ) , ListenerWaitError > ;
21
+ fn blocking_wait ( & self ) -> Result < ( ) , ListenerWaitError > ;
22
+ }
You can’t perform that action at this time.
0 commit comments