Parcourir la source

Use `PlatformSupport.makeEventLoopGroup` on BasicTutorial (#1179)

SungdooYoo il y a 4 ans
Parent
commit
680f34ce47
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      Sources/Examples/RouteGuide/Client/main.swift
  2. 1 1
      docs/basic-tutorial.md

+ 1 - 1
Sources/Examples/RouteGuide/Client/main.swift

@@ -201,7 +201,7 @@ struct RouteGuide: ParsableCommand {
     // Load the features.
     let features = try loadFeatures()
 
-    let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
+    let group = PlatformSupport.makeEventLoopGroup(loopCount: 1)
     defer {
       try? group.syncShutdownGracefully()
     }

+ 1 - 1
docs/basic-tutorial.md

@@ -473,7 +473,7 @@ use the `insecure` builder and specify the server address and port we want to
 connect to:
 
 ```swift
-let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
+let group = PlatformSupport.makeEventLoopGroup(loopCount: 1)
 defer {
   try? group.syncShutdownGracefully()
 }