Skip to content

Commit 1fd84e6

Browse files
committed
Return non-opaque type when unregistering multiple sigactions
1 parent 4d0bd61 commit 1fd84e6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Sources/SignalHandling/DelayedSigaction/SigactionDelayer_Block.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ public enum SigactionDelayer_Block {
133133
All of the delayed sigaction will be attempted to be unregistered. Errors
134134
will be returned. The function is successful if the returned dictionary is
135135
empty. */
136-
public static func unregisterDelayedSigactions(_ delayedSigactions: Set<DelayedSigaction>) -> [DelayedSigaction: Error] {
136+
public static func unregisterDelayedSigactions(_ delayedSigactions: Set<DelayedSigaction>) -> [Signal: Error] {
137137
return signalProcessingQueue.sync{
138-
var ret = [DelayedSigaction: Error]()
138+
var ret = [Signal: Error]()
139139
for delayedSigaction in delayedSigactions {
140140
do {try Self.unregisterDelayedSigactionOnQueue(delayedSigaction)}
141-
catch {ret[delayedSigaction] = error}
141+
catch {ret[delayedSigaction.signal] = error}
142142
}
143143
return ret
144144
}

Sources/SignalHandling/DelayedSigaction/SigactionDelayer_Unsig.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ public enum SigactionDelayer_Unsig {
7070
All of the delayed sigaction will be attempted to be unregistered. Errors
7171
will be returned. The function is successful if the returned dictionary is
7272
empty. */
73-
public static func unregisterDelayedSigactions(_ delayedSigactions: Set<DelayedSigaction>) -> [DelayedSigaction: Error] {
73+
public static func unregisterDelayedSigactions(_ delayedSigactions: Set<DelayedSigaction>) -> [Signal: Error] {
7474
return signalProcessingQueue.sync{
75-
var ret = [DelayedSigaction: Error]()
75+
var ret = [Signal: Error]()
7676
for delayedSigaction in delayedSigactions {
7777
do {try Self.unregisterDelayedSigactionOnQueue(delayedSigaction)}
78-
catch {ret[delayedSigaction] = error}
78+
catch {ret[delayedSigaction.signal] = error}
7979
}
8080
return ret
8181
}

0 commit comments

Comments
 (0)