<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 創建協程 xgo + Channel 基本用法: [>> 到 GitHub 查看 DEMO <<](https://github.com/mix-php/mix-skeleton/blob/master/app/Console/Commands/CoroutineCommand.php) ## 講解 - 首先使用 xgo 方法,以閉包的形式開啟一個協程。 - 接下來在 for 循環中,使用 xgo 以 callable 的方式啟動子協程,并傳遞一個 Channel 參數。 - 代碼在 `xgo([$this, 'foo'], $chan);` 那里并不會阻塞,而是繼續往下執行 - 執行到 `$chan->pop()` 時,由于 sql 查詢還未執行,于是當前協程阻塞,釋放執行流到 `foo` 方法中執行sql - 當 sql 執行完時, `$chan->pop()` 被喚醒并返回數據,繼續往下執行。 - 直到循環執行完畢,`println` 打印總執行時間。 - 輸出 `Time: 5s ` 說明兩次 SQL 查詢是并行執行的。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看