Commit Graph
15 Commits
Author SHA1 Message Date
Sean Braithwaite e7ee314c99 Subsume the demuxer into the reactor
+ Simplify the design by demuxing events directly in the reactor
2019-09-13 11:33:38 -04:00
Sean Braithwaite c62b7fbd7e feedback tweaks 2019-09-12 12:50:25 -04:00
Sean Braithwaite 5474528db1 Switch to a priority queue:
* Routines will now use a priority queue instead of channels to
    iterate over events
2019-09-12 12:06:26 -04:00
Sean Braithwaite 9d41770a99 Close rdy channel
+ close `rdy` channel to ensure that calls to `<-ready()` will
    always return if the routine is ready
2019-08-21 21:37:53 +02:00
Sean Braithwaite f81c319ece Add some docs 2019-08-13 19:29:28 +02:00
Sean Braithwaite 78d4c3b88a fixes based on feedback 2019-08-13 17:57:17 +02:00
Sean Braithwaite 2c8cbfc26a linter fixes 2019-08-08 17:42:46 +02:00
Sean Braithwaite acbfe67fb8 set logger 2019-08-08 16:56:39 +02:00
Sean Braithwaite aeac4743cc typo fix 2019-08-08 16:54:25 +02:00
Sean Braithwaite e826ca3c49 demuxer cleanup 2019-08-08 16:48:07 +02:00
Sean Braithwaite 5b880fbcff cleanup events 2019-08-08 15:53:02 +02:00
Sean Braithwaite c081b60ef6 Solidify API:
+ use `trySend` the replicate peer sending
    + expose `next()` as a chan of events as output
    + expose `final()` as a chan of error, for the final error
    + add `ready()` as chan struct when routine is ready
2019-08-08 15:12:11 +02:00
Sean Braithwaite e4913f533a Fix race condition in shutdown:
+ ensure that we stop accepting messages once `stop` has been called
      to avoid the case in which we attempt to write to a channel which
      has already been closed
2019-08-06 18:00:14 +02:00
Sean Braithwaite 0cf9f86292 Modification based on feedback
+ `routine.send` returns false when routine is not running
    + this will prevent panics sending to channels which have been
    closed
    + Make output channels routine specific removing the risk of someone
    writting to a channel which was closed by another touine.
    + consistency changes between the routines and the demuxer
2019-08-06 13:27:15 +02:00
Sean Braithwaite d1671d6175 blockchain v2: routines
+ Include an implementaiton of the routines specified in ADR-43
    along with a demuxer and some dummy reactor code
2019-08-03 09:19:32 +02:00