10 Commits

Author SHA1 Message Date
Sean Braithwaite
99b7a33f90 align buffer sizes 2019-09-14 13:01:19 -04:00
Sean Braithwaite
9bd2c0389f rename trySend to end 2019-09-13 18:54:25 -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
2c8cbfc26a linter fixes 2019-08-08 17:42:46 +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