<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          libPhenomC 語言并發(fā)編程框架

          聯(lián)合創(chuàng)作 · 2023-09-29 13:46

          libPhenom 是 Facebook 發(fā)布的一個高性能的C語言并發(fā)編程框架,支持事件驅(qū)動,支持多線程,還提供了內(nèi)存管理和常用數(shù)據(jù)結(jié)構(gòu),甚至是json處理。

          示例代碼:

          #include "phenom/defs.h"
          #include "phenom/job.h"
          #include "phenom/log.h"
          #include "phenom/sysutil.h"
          
          int main(int argc, char **argv)
          {
            // Must be called prior to calling any other phenom functions
            ph_library_init();
            // Optional config file for tuning internals
            ph_config_load_config_file("/path/to/my/config.json");
            // Enable the non-blocking IO manager
            ph_nbio_init(0);
          
            // Do stuff here to register client/server stuff.
            // This enables a very simple request/response console
            // that allows you to run diagnostic commands:
            // `echo memory | nc -UC /tmp/phenom-debug-console`
            // The code behind this is in
            // https://github.com/facebook/libphenom/blob/master/corelib/debug_console.c
            ph_debug_console_start("/tmp/phenom-debug-console");
          
            // Run
            ph_sched_run();
          
            return 0;
          }
          瀏覽 23
          點(diǎn)贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點(diǎn)贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  色就是色setufree | 五月婷婷啪 | 色婷婷五月天激情 | 狠狠av | 亚洲av免费在线看 |