You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/Configuration.swift
+65-9Lines changed: 65 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,44 @@
1
1
import Dispatch
2
2
3
-
/**
4
-
PromiseKit’s configurable parameters.
3
+
// PromiseKit’s configurable parameters.
5
4
6
-
Do not change these after any Promise machinery executes as the configuration object is not thread-safe.
5
+
publicstructNoValue:Dispatcher{
6
+
publicinit(){}
7
+
publicfunc dispatch(_ body:@escaping()->Void){
8
+
fatalError("NoValue dispatcher should never actually be used as a dispatcher")
9
+
}
10
+
}
7
11
8
-
We would like it to be, but sadly `Swift` does not expose `dispatch_once` et al. which is what we used to use in order to make the configuration immutable once first used.
9
-
*/
10
12
publicstructPMKConfiguration{
13
+
14
+
publicvarrequireChainConfirmation=true
15
+
11
16
/// Backward compatibility: the default Dispatcher to which handlers dispatch, represented as DispatchQueues.
17
+
@available(*, deprecated, message:"Use conf.setDefaultDispatchers(body:tail:) to set default dispatchers in PromiseKit 7+")
0 commit comments