Also interrupt pollers when shutting down the WSTP#4340
Also interrupt pollers when shutting down the WSTP#4340djspiewak merged 4 commits intotypelevel:series/3.6.xfrom
Conversation
armanbilge
left a comment
There was a problem hiding this comment.
Thanks! Want to add a test? 🤠
|
I was thinking about a test... but this is only JVM (in this branch), and on the JVM it already works correctly. So what would we test? |
It doesn't work correctly on the JVM, it just so happens that our current polling systems happen to respect |
|
I think the best way to test this is probably to make a mock polling system that just mutates a flag when it gets interrupted. Then make a runtime, wait a second, and shut it down. |
|
Yeah, uh... we could do that. But I was already almost done with this much more convoluted test, when you wrote that comment... :-) This way at least we're testing a somewhat realistic shutdown procedure, if I didn't mess it up. (But let me know it it's too much.) |
djspiewak
left a comment
There was a problem hiding this comment.
LOL! I mean, this is magnificent, but I think it'll be easier to maintain if we do the mock interrupt thing. We can even make it deterministic because we can release a latch when we "sleep", which then would trigger the test to shutdown the runtime. Or we could even shut down the runtime directly from inside the mock system, that type of thing.
As discussed in #4201.