linkedin/parseq

Getting the output of side effect

Closed this issue · 2 comments

Is it ever possible (or useful) to get the output of a side effect task?
If not, then shouldn't the second argument here be Task<Void> rather than Task<?>?

I understand why could have this kind of question. Your understanding is correct though, the withSideEffect tasks generally do not require output.

But in Parseq we kept this open because it does have other use case. For example you can refer to an existing Task and run it with withSideEffect .

So to conclude, we keep this open. For withSideEffect whether it returns or not doesn't matter that much. What mattered is its task lifecycle, think it as a daemon

Got it. Thanks