- 授权协议: MIT
- 开发语言: C/C++
- 操作系统: 跨平台
- 软件首页: http://millc.org/
- 软件文档: http://millc.org/documentation.html
软件介绍
MILL 为 C 语言提供了 Go 语言风格的并发控制。
示例代码:
#include <stdio.h>
#include <mill.h>
void worker(int count, const char *text, chan ch) {
int i;
for(i = 0; i != count; ++i) {
printf("%s\n", text);
musleep(10000);
}
chs(ch, int, 0);
chclose(ch);
}
int main() {
chan ch1 = chmake(int, 0);
go(worker(4, "a", chdup(ch1)));
chan ch2 = chmake(int, 0);
go(worker(2, "b", chdup(ch2)));
choose {
in(ch1, int, val):
printf("coroutine 'a' have finished first!\n");
in(ch2, int, val):
printf("coroutine 'b' have finished first!\n");
end
}
chclose(ch2);
chclose(ch1);
return 0;
}
两周自制脚本语言
[日]千叶 滋 / 陈筱烟 / 人民邮电出版社 / 2014-6 / 59.00元
《两周自制脚本语言》是一本优秀的编译原理入门读物。全书穿插了大量轻松风趣的对话,读者可以随书中的人物一起从最简单的语言解释器开始,逐步添加新功能,最终完成一个支持函数、数组、对象等高级功能的语言编译器。本书与众不同的实现方式不仅大幅简化了语言处理器的复杂度,还有助于拓展读者的视野。 《两周自制脚本语言》适合对编译原理及语言处理器设计有兴趣的读者以及正在学习相关课程的大中专院校学生。同时,已经......一起来看看 《两周自制脚本语言》 这本书的介绍吧!
