Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngot/go
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ngot/go
- Owner: ngot
- Created: 2016-03-27T10:16:47.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-03-27T10:21:47.000Z (over 8 years ago)
- Last Synced: 2024-10-17T10:29:08.485Z (2 months ago)
- Language: JavaScript
- Size: 42 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# go
MutiThread function `go`, just like in golang!# Usage
```js
const go = require('go');
let res = go([1, 2], arrs => arrs.map(d => ++d));
```The function passed to `go` will be executed in a independent isolation,which means it's scope is different from normal function.parameter passing is the only way to communicate with the thread.
# test
```
fibjs test/index.test.js
```# Attendtion
- You can only use this lib on [fibjs](https://github.com/xicilion/fibjs).It does not support Node.js.