Modelling a "processing pipeline: #6
Replies: 3 comments
-
|
@disconsented Hey, thanks for reaching out! I'm not sure I understand your question. Yes, it is true that with Par, some things have to be done differently, but I'm not sure which part you're finding trouble with. To your first question, why do you want to lift out of Par? I don't mean you shouldn't do it, I'm just trying to understand your purpose, so I can help. To your second question, what's the |
Beta Was this translation helpful? Give feedback.
-
Off the top of my head, two use cases:
For an example, Alternatively, maybe to make use of typestates. I guess, really, some kind of map operation like |
Beta Was this translation helpful? Give feedback.
-
|
For such lifting out of Par, yes, a channel is a good idea. The I'm still not a 100% sure I understand your second question, but is it maybe that you want the communication to proceed differently depending on if you got Of course, change To understand this pattern better, check out the branching section of the docs: https://docs.rs/par/latest/par/#branching But if I got you wrong, please clarify :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, it's me again 👋 this is largely a follow-up of the issue I opened a little while ago. I'm having a bit of trouble modelling behaviour here.
In classic CSP, this is all straightforward, just use channels to pass data around. But, par's a little more tricky.
I'm designing a “pipeline” for processing data, I want it to work something like:
I'm finding two parts tricky:
Lifting out of Par isn't obvious, I've not yet discovered a way to do this without something like a channel. How should I do this?
And, how do I use
Session::linkto chain together things, when, I want to modify T before?Beta Was this translation helpful? Give feedback.
All reactions