- 授权协议: MIT
- 开发语言: C/C++
- 操作系统: Linux
- 软件首页: http://libdill.org/
- 软件文档: http://libdill.org/documentation.html
- 官方下载: http://libdill.org/download.html
软件介绍
Libdill 是一个 C 开发库,可以轻松用来编写结构化的并发程序。下面例子启动两个并发的 worker 函数打印 Hello 和 World :
#include <libdill.h>
#include <stdio.h>
#include <stdlib.h>
coroutine void worker(const char *text) {
while(1) {
printf("%s\n", text);
msleep(now() + random() % 500);
}
}
int main() {
go(worker("Hello!"));
go(worker("World!"));
msleep(now() + 5000);
return 0;
}编译方法:
$ cc -ldill -o hello hello.c
Alone Together
Sherry Turkle / Basic Books / 2011-1-11 / USD 28.95
Consider Facebookit’s human contact, only easier to engage with and easier to avoid. Developing technology promises closeness. Sometimes it delivers, but much of our modern life leaves us less connect......一起来看看 《Alone Together》 这本书的介绍吧!
