Daerth is Eeeevvilll, as in frueets of the deeeviilll, and it triumphs over Good! Use it to control minions of asynchronous threaded pipelined backpressure-mediated death stations, to dominate rogue cores and to exploit computational resources throughout the galaxy.
Daerth was inspired by a conversation in the Tcl Chatroom in 2015-04 about the thread package. The system contemplates a scenario in which each station is a thread, some stations are producers, others are filters, others are consumers, and one is the master. Less hierarchical arrangements have not been attempted, but may also work.
Each station may produce messages for and/or consume messages from other stations. Two settings are provided to manage congestion in the pipelines. The standard -eventmark configuration limits the queue of incoming calls from other threads, and another setting, 'limit, limits the number of asynchronous posts to other threads that a thread may have simultaneously pending.
Each station may operate in one of two dispatch modes: multi or balance. In multi mode, each message is dispatched to all consumers. In balance mode, each message is sent to one of the least busy consumers.
With the default error propagation system, an error on any thread will cause the entire network of stations to halt. To avoid this, catch errors in the work script of the stations.
Daerth requires Thread version 2.7.3 (not yet released), or some other version of Thread that includes a fix for the issue -eventmark + thread::send -async == deadlock .
Daerth is located in the ycl repository, but doesn't actually depend on anything else in ycl.
The unit tests provide some working examples.