rig icon indicating copy to clipboard operation
rig copied to clipboard

feat: implement TryParallel operator

Open crStiv opened this issue 11 months ago • 4 comments

  • Implements TryParallel struct for parallel execution of operations with error handling
  • Uses futures::try_join! for concurrent execution
  • Adds tests for success and error cases
  • Supports nested parallel operations

Resolves TODO in try_op.rs

crStiv avatar Jan 19 '25 22:01 crStiv

Hey @crStiv , thanks for the contribution! I had completely forgotten about that TODO :sweat_smile:

FYI there is already a try_parallel! macro (see this test) which works similarly to the parallel! macro.

I'll still approve this since for regular parallel operations we have both an op Parallel and macro parallel! so it makes sense to have both as well for try_parallel.

Cheers!

cvauclair avatar Jan 20 '25 15:01 cvauclair

Hey @crStiv , thanks for the contribution! I had completely forgotten about that TODO 😅

FYI there is already a try_parallel! macro (see this test) which works similarly to the parallel! macro.

I'll still approve this since for regular parallel operations we have both an op Parallel and macro parallel! so it makes sense to have both as well for try_parallel.

Cheers!

oh, yeah I see now, interesting...

anyway, it was a pleasure to help you!

btw when you'll have time, please merge it

crStiv avatar Jan 20 '25 22:01 crStiv

@crStiv just need to pass the fmt check (run cargo fmt) and then we can merge, cheers!

cvauclair avatar Jan 23 '25 18:01 cvauclair

@crStiv it seems like the last commit you've pushed hasn't fixed the cargo fmt issue, can you also rebase w/ main so that this is up to date!

0xMochan avatar Feb 05 '25 19:02 0xMochan