Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://gitlab.com/kosmospredanie/gpseq
A parallelism library for Vala and GObject
https://gitlab.com/kosmospredanie/gpseq
GObject channels fork-join glib multithreading parallel parallelism vala work-stealing
Last synced: 8 days ago
JSON representation
A parallelism library for Vala and GObject
- Host: gitlab.com
- URL: https://gitlab.com/kosmospredanie/gpseq
- Owner: kosmospredanie
- License: lgpl-2.1
- Created: 2019-05-10T09:48:32.641Z (over 5 years ago)
- Default Branch: master
- Last Synced: 2024-08-02T00:26:12.358Z (3 months ago)
- Topics: GObject, channels, fork-join, glib, multithreading, parallel, parallelism, vala, work-stealing
- Stars: 18
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: COPYING
Awesome Lists containing this project
- awesome-vala - gpseq - A parallelism library for Vala and GObject. (Libraries / Concurrency)
README
# gpseq
[![pipeline status](https://gitlab.com/kosmospredanie/gpseq/badges/master/pipeline.svg?style=flat-square)](https://gitlab.com/kosmospredanie/gpseq/commits/master)
[![coverage report](https://gitlab.com/kosmospredanie/gpseq/badges/master/coverage.svg?style=flat-square)](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).