ソースを参照

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

SungdooYoo 4 年 前
コミット
680f34ce47
2 ファイル変更2 行追加2 行削除
  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.
     // Load the features.
     let features = try loadFeatures()
     let features = try loadFeatures()
 
 
-    let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
+    let group = PlatformSupport.makeEventLoopGroup(loopCount: 1)
     defer {
     defer {
       try? group.syncShutdownGracefully()
       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:
 connect to:
 
 
 ```swift
 ```swift
-let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
+let group = PlatformSupport.makeEventLoopGroup(loopCount: 1)
 defer {
 defer {
   try? group.syncShutdownGracefully()
   try? group.syncShutdownGracefully()
 }
 }