groostav
06/28/2019, 11:51 PM@guava.Subscribe suspend fun handle(event: MyEvent)
functions, but by default guava has no idea how to handle that.
I've tried:
1. switching my tests to invoke handlers directly. This works for tests but has trouble with some of our components
2. adding an obnoxious inheritance system to try and keep a List<Job>
on the event itself, that gets appended to by subscribers. This is not great.
I'd be willing to take a fork of evenBus just for support for concurrent & synchronous event publication, especially if I can get it without retrofitting existing blocking java code.suspend
across <http://eventBus.post|eventBus.post>()
calls is making things very difficult.Evan R.
07/23/2019, 8:53 PMhandle()
function a suspend function? Is it called by other things or are you trying to get it to be handled in some coroutine context?groostav
07/23/2019, 9:37 PMsuspend
(read: synchronous & concurrent) operation, but to do that, it needs to back-pressure the caller of post
by suspend
-ing it.EventBus
and inheritence on events (sigh) is still the best way to go.Evan R.
07/25/2019, 12:37 PM