Skip to content
/ gpseq Public

A parallelism library for Vala and GObject (mirror)

License

LGPL-3.0, LGPL-2.1 licenses found

Licenses found

LGPL-3.0
COPYING
LGPL-2.1
COPYING-libgee
Notifications You must be signed in to change notification settings

apebl/gpseq

Repository files navigation

gpseq

pipeline status coverage report

Gpseq is a parallelism library for Vala and GObject.

using Gpseq;

void main () {
    string[] array = {"dog", "cat", "pig", "boar", "bear"};
    Seq.of_array<string>(array)
        .parallel()
        .filter(g => g.length == 3)
        .map<string>(g => g.up())
        .foreach(g => print("%s\n", g))
        .wait();
}

// (possibly unordered) output:
// DOG
// CAT
// PIG
using Gpseq;

void main () {
    Channel<string> chan = Channel.bounded<string>(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, valadoc, and gtkdoc (C API).

There is a developer's guide in the wiki.

Install

See the installation guide.

License

Gpseq is released under the LGPL 3.0 license.

Libgee

Gpseq uses a modified version of timsort.vala of libgee. See TimSort.vala and COPYING-libgee.