Skip to content
Discussion options

You must be logged in to vote

@alerosmile Back to this: yes if a thread cancels while another thread is busy with processing an item, the 2 events will be concurrent, and the termination callback will be called concurrently. This is by design of reactive streams.

What you could do is have some critical section in both the termination and item processing handler (say, in a onItem().transform(...)). But ideally whatever logic you have in a termination handler shall assume asynchronicity.

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@jponge
Comment options

@jponge
Comment options

@cescoffier
Comment options

@jponge
Comment options

@alerosmile
Comment options

Comment options

You must be logged in to vote
4 replies
@jponge
Comment options

@alerosmile
Comment options

@jponge
Comment options

Answer selected by alerosmile
@alerosmile
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants