Commit e554b9eb authored by Ralph Alexander Bariz's avatar Ralph Alexander Bariz 💬


parent 308c8eb2
Pipeline #1323 skipped
This diff is collapsed.
module causal.core.branch;
This is an impelentation of causality execution pattern.
/// Binds given reference S and parameter with index I of given Tick
struct Bond { @nogc nothrow:
@disable this();
this(Tick, I, S)(ref S source) {
//TODO check if source is a typed essence
//TODO check if parameter with index I is either a reference(off), ref of same type as source, a const ref(ro) of same type as source, a copy of same type as or implicitly convertible from source
/// Holds a pure @nogc void callable taking a causal branch and a set of mutable and/or const value references
struct Act { @nogc nothrow:
private import std.traits : isCallable, functionAttributes, ReturnType;
private void function() call;
@disable this();
this(Tick, B, A...)(ref B b, ref A a)
if(Tick.length == 1 && isCallable!Tick &&
functionAttributes!Tick & FA.pure_ &&
functionAttributes!Tick & FA.nogc &&
is(ReturnType!Tick == void)) {
//TODO create bonds
/// Estimates the order of acts execution within a causality
struct Branch { @nogc: }
/// Provides one or multiple `Branch`es with processing capabilities
struct Worker { @nogc: }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment