New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libs/pubsub: make message tags available to subscribers #1879
Comments
We definitely want to send tags alongside the msg. The first "obvious solution" seems like a good way to go.
I don't see how this plays with the current query specification (e.g. "atom_count > 5").
I have a msg ("Hi") and atom_count: 6. Of course, we can encode the latter as a string @Bric3d still want to help? |
Done in #3227. |
…int#1879) * blocksync: wait for poolRoutine to stop in (*Reactor).OnStop blocksync.(*Reactor).poolRoutine goroutine lifetime was not supervised, so OnStop returning did not provide a guarantee that it was done. As a result, the other services could be stopped and a subsequent call to bcR.blockExec.ApplyBlock would cause a panic, typically a leveldb closed error. This change uses a sync.WaitGroup to ensure that OnStop returns after poolRoutine has returned. This also triggers the poolRoutine method to return on a signal from bcR.pool.Quit() instead of just bcR.Quit(), which seems to be important as (*Reactor).OnStop itself can only stop the BlockPool (bcR.pool), while the BaseReactor.BaseService's quit channel will only be closed _after_ (*Reactor).OnStop has returned. * rename wg field, comment on strayish select before retry * break poolRoutine on either Quit before quick retry * update changelog * break the loop with an IsRunning check * do the waitgroup Add and Defer at the same site for clarity * check both services IsRunning in poolRoutine * fix oopsie --------- Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
original issue: tendermint/tmlibs#143
see ^ for lengthy discussion
The text was updated successfully, but these errors were encountered: