File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ More specialized modules provide concrete implementations of many of the abstrac
2121
2222- `` EventLoopGroup ``
2323- `` EventLoop ``
24- - `` NIOEventLoopGroupProvider ``
2524- `` EventLoopIterator ``
2625- `` Scheduled ``
2726- `` RepeatedTask ``
Original file line number Diff line number Diff line change @@ -1246,16 +1246,33 @@ extension EventLoopGroup {
12461246}
12471247#endif
12481248
1249- /// This type is intended to be used by libraries which use NIO, and offer their users either the option
1249+ /// Deprecated.
1250+ ///
1251+ /// This type was intended to be used by libraries which use NIO, and offer their users either the option
12501252/// to `.share` an existing event loop group or create (and manage) a new one (`.createNew`) and let it be
12511253/// managed by given library and its lifecycle.
1254+ ///
1255+ /// Please use a `group: any EventLoopGroup` parameter instead. If you want to default to a global
1256+ /// singleton group instead, consider group: any EventLoopGroup = MultiThreadedEventLoopGroup.singleton` or
1257+ /// similar.
1258+ ///
1259+ /// - See also: https://github.com/apple/swift-nio/issues/2142
12521260public enum NIOEventLoopGroupProvider {
12531261 /// Use an `EventLoopGroup` provided by the user.
12541262 /// The owner of this group is responsible for its lifecycle.
12551263 case shared( EventLoopGroup )
1256- /// Create a new `EventLoopGroup` when necessary.
1264+
1265+ /// Deprecated. Create a new `EventLoopGroup` when necessary.
12571266 /// The library which accepts this provider takes ownership of the created event loop group,
12581267 /// and must ensure its proper shutdown when the library is being shut down.
1268+ @available (
1269+ * ,
1270+ deprecated,
1271+ message: """
1272+ Please use `.shared(existingGroup)` or use the singleton via
1273+ `.shared(MultiThreadedEventLoopGroup.singleton)` or similar
1274+ """
1275+ )
12591276 case createNew
12601277}
12611278
You can’t perform that action at this time.
0 commit comments