- 授权协议: Apache
- 开发语言: C/C++
- 操作系统: 跨平台
- 软件首页: https://github.com/tylertreat/chan
- 软件文档: https://github.com/tylertreat/chan
- 官方下载: https://github.com/tylertreat/chan
软件介绍
chan 是纯 C 实现的 Go 的 Channels,示例代码:
#include <pthread.h>
#include <stdio.h>
#include "chan.h"
chan_t* chan;
void* ping()
{
// Send blocks until receiver is ready.
chan_send(chan, "ping");
return NULL;
}
int main()
{
// Initialize unbuffered channel.
chan = chan_init(0);
pthread_t th;
pthread_create(&th, NULL, ping, NULL);
// Receive blocks until sender is ready.
void* msg;
chan_recv(chan, &msg);
printf("%s\n", msg);
// Clean up channel.
chan_dispose(chan);
}
从规范出发的程序设计
[美] Carroll Morgan / 裘宗燕 / 机械工业出版社 / 2002-8 / 45.00元
本书详细论述了有关规范程序设计的内容,包括:程序和精化、谓词演算、选择、迭代、构造类型、模块和封装等,最后几章还包含了大量的实例研究和一些更高级的程序设计技术。本书提倡一种严格的程序开发方法,分析问题要用严格方式写出程序的规范,而后通过一系列具有严格理论基础的推导,最终得到可以运行的程序。 本书是被世界上许多重要大学采用的教材,适于计算机及相关专业的本科生和研究生使用。一起来看看 《从规范出发的程序设计》 这本书的介绍吧!
