https://github.com/apebl/gpseq
A parallelism library for Vala and GObject (mirror)
https://github.com/apebl/gpseq
channels fork-join glib gobject multithreading parallel parallelism vala work-stealing
Last synced: 4 months ago
JSON representation
A parallelism library for Vala and GObject (mirror)
- Host: GitHub
- URL: https://github.com/apebl/gpseq
- Owner: apebl
- License: lgpl-3.0
- Created: 2019-07-28T13:52:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-21T00:10:46.000Z (almost 6 years ago)
- Last Synced: 2024-12-18T03:53:25.918Z (about 1 year ago)
- Topics: channels, fork-join, glib, gobject, multithreading, parallel, parallelism, vala, work-stealing
- Language: Vala
- Homepage: https://gitlab.com/kosmospredanie/gpseq
- Size: 719 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: COPYING
Awesome Lists containing this project
README
# gpseq
[](https://gitlab.com/kosmospredanie/gpseq/commits/master)
[](https://gitlab.com/kosmospredanie/gpseq/-/jobs/artifacts/master/file/coverage/index.html?job=test)
Gpseq is a parallelism library for Vala and GObject.
```vala
using Gpseq;
void main () {
string[] array = {"dog", "cat", "pig", "boar", "bear"};
Seq.of_array(array)
.parallel()
.filter(g => g.length == 3)
.map(g => g.up())
.foreach(g => print("%s\n", g))
.wait();
}
// (possibly unordered) output:
// DOG
// CAT
// PIG
```
```vala
using Gpseq;
void main () {
Channel chan = Channel.bounded(0);
run( () => chan.send("ping").ok() );
print("%s\n", chan.recv().value);
}
// output:
// ping
```
## Features
- Work-stealing task scheduling with managed blocking
- Functional programming for data processing with parallel execution support (Seq)
- Unbuffered, buffered, and unbounded MPMC channels
- Fork-join parallelism
- Parallel sorting
- Futures and promises
- 64-bit atomic operations
- Overflow safe arithmetic functions for signed integers
- ...
## Documentation
Read [wiki](https://gitlab.com/kosmospredanie/gpseq/wikis),
[valadoc](https://valadoc.org/gpseq-1.0/index.htm),
and [gtkdoc (C API)](https://gitlab.com/kosmospredanie/gpseq/-/jobs/artifacts/master/file/gtkdoc/html/index.html?job=build).
There is a developer's guide in the wiki.
## Install
See the [installation guide](INSTALL.md).
## License
Gpseq is released under the [LGPL 3.0 license](COPYING).
### Libgee
Gpseq uses a modified version of timsort.vala of libgee.
See [TimSort.vala](src/TimSort.vala) and [COPYING-libgee](COPYING-libgee).