libPhenomC 语言并发编程框架
libPhenom 是 Facebook 发布的一个高性能的C语言并发编程框架,支持事件驱动,支持多线程,还提供了内存管理和常用数据结构,甚至是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; }
评论
Clojure并发编程语言
Clojure是一种LISP风格的语言,运行在JVM上。Clojure的一大特色就是其并发机制,它支持不可变的数据结构(Clojure是来自于可持久化的数据结构)。Clojure还有一个特色是软件事务
Clojure并发编程语言
0
JR并发编程语言
JR是一个专门用来解决并发编程问题的编程语言,这是一个Java语言对并发编程的一个模型,通过信号量和进程可让并发应用的编写变得非常简单。JR只是在Java上做了一个新层,通过一个编译器转换成Java代
JR并发编程语言
0