- 授权协议: MIT
- 开发语言: Google Go
- 操作系统: 跨平台
- 软件首页: https://github.com/buptmiao/parallel
- 软件文档: https://github.com/buptmiao/parallel/blob/master/README_CN.md
软件介绍
一个golang并行编程库,用于业务聚合或重构。可以用最少的代码,将串行的函数调用并行化,无需改变函数的声明。
实现原理和demo参考github地址:https://github.com/buptmiao/parallel
使用:
以下有三种方法:testjoba,testjobb,testjobc执行并行:
import (
"github.com/buptmiao/parallel"
)
func testJobA() string {
return "job"
}
func testJobB(x, y int) int {
return x + y
}
func testJobC(x int) int {
return -x
}
func main() {
var s string
var x, y int
p := parallel.NewParallel()
p.Register(testJobA).SetReceivers(&s)
p.Register(testJobB, 1, 2).SetReceivers(&x)
p.Register(testJobC, 3).SetReceivers(&y)
// block here
p.Run()
if s != "job" || x != 3 || y != -3{
panic("unexpected result")
}
}
付费:互联网知识经济的兴起
方军 / 机械工业出版社 / 2017-6-1 / CNY 59.00
关于互联网知识付费的首部作品 知识工作正在被重塑,知识经济正在开启互联网时代下半场 为你展现互联网知识经济全景大图,解读新物种的前世今生 内容简介 一个产业解读 三个分析工具 一组知识卡片 书是最早的知识载体,已有2000多年的付费历史,随着移动互联网的普及,新的知识经 济在今天爆发,知识的创造者和传播者从书后走到了书前,互联网知识经济正在拉开帷幕。知识的......一起来看看 《付费:互联网知识经济的兴起》 这本书的介绍吧!
