<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # 4.0.1 主要更新 ------ * 支持`MySQL8`全新的`caching_sha2_password`密碼驗證算法 * 增加`enable_coroutine`配置項,用于關閉自動創建協程 * 移除`--enable-coroutine`編譯配置 * 修復`chan->push`無法立即喚醒等待協程的問題 關閉內置協程 ---- `4.0.1`之前的版本,底層在`Server`和`Timer`的事件回調函數中會自動創建協程,如果回調函數中沒有使用任何協程`API`,這會浪費一次協程創建/銷毀操作。而且無法與`1.x`保持兼容。 新版本中增加了`enable_coroutine`配置項,可關閉內置協程。用戶可根據需要,在回調函數中自行使用`Coroutine::create`或`go`創建協程。關閉內置協程后,底層與`1.x`版本的行為保持了一致性,實現了`100%`兼容。原先使用`1.x`的框架,也可以直接基于`4.0`作為運行環境。 現在可以動態選擇是否啟用內置協程,那么`--enable-coroutine`編譯配置變得可有可無了。新版本中移除了該編譯選項。 ```php use Swoole\Http\Request; use Swoole\Http\Response; $http = new swoole_http_server('127.0.0.1', 9501); $http->set([ 'enable_coroutine' => false, // close build-in coroutine ]); $http->on('workerStart', function () { echo "Coroutine is " . (Co::getuid() > 0 ? 'enable' : 'disable')."\n"; }); $http->on("request", function (Request $request, Response $response) { $response->header("Content-Type", "text/plain"); if ($request->server['request_uri'] == '/co') { //關閉內置協程后,需要手工創建協程 go(function () use ($response) { $response->end("Hello Coroutine #" . Co::getuid()); }); } else { //沒有任何協程操作,這里不存在額外的協程調度開銷 $response->end("Hello Swoole #" . Co::getuid()); } }); $http->start(); ```
                  <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>

                              哎呀哎呀视频在线观看