Skip to content
Discussion options

You must be logged in to vote

The Channel.of channel factory creates a queue channel, not a value channel. To create a value channel, you either use the Channel.value channel factory, or a channel operator that returns a single element, such as first, collect, sum and count, so you did no workaround. You just did what you'd usually do if you want a value channel 😄

Besides, within processes you deal with regular variables, not channels, so if you want to apply a function to a list or something, you just do Groovy and it should be fine. Instead of using all, use .every { it == true }, e.g.:

...

def all_true = myVal.every { it == true }
...

This change to your original code made it work here. Check the output:

N E X T …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@MajoroMask
Comment options

Answer selected by MajoroMask
Comment options

You must be logged in to vote
1 reply
@MajoroMask
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