Skip to main content

module Manager

rascal-0.28.2

Usage

import util::tasks::Manager;

alias Task[&T,&N] {#util-tasks-Manager-Task[&T,&N]}

bool (Transaction tr, type[&T] key, &N name)

function registerProducer

void registerProducer(Task[&T,&N] producer, set[value] keys)

function unregisterProducer

void unregisterProducer(Task[&T,&N] producer)

function lockProducerRegistry

Lock the producer registry – use this before adding/removing a set of related producers. Remember to enclose the critical section in try { ... } finally { unlockProducerRegistry(); }

void lockProducerRegistry()

function unlockProducerRegistry

void unlockProducerRegistry()

function registryTransaction

void registryTransaction(void() f)

alias Transaction

value

alias Fact

value

function startTransaction

Transaction startTransaction()

Transaction startTransaction(Transaction parent)

function endTransaction

void endTransaction(Transaction tr)

function abandonTransaction

void abandonTransaction(Transaction tr)

function getFact

&T getFact(Transaction tr, type[&T] key, value name)

function queryFact

&T queryFact(Transaction tr, type[&T] key, value name)

function hasFact

bool hasFact(Transaction tr, type[&T] key, value name)

function removeFact

void removeFact(Transaction tr, type[&T] key, value name)

function setFact

Fact setFact(Transaction tr, type[&T] key, value name, &T val)

function getDependencyGraph

tuple[rel[str,str,str,int],rel[str,str,str]] getDependencyGraph(Transaction tr)