docs icon indicating copy to clipboard operation
docs copied to clipboard

Added example for limiting workflow concurrency in .NET fan-in/out example

Open WhitWaldo opened this issue 1 year ago • 1 comments

Thank you for helping make the Dapr documentation better!

Please follow this checklist before submitting:

  • [X] Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • [X] Read the contribution guide
  • [X] Commands include options for Linux, MacOS, and Windows within codetabs
  • [X] New file and folder names are globally unique
  • [X] Page references use shortcodes instead of markdown or URL links
  • [X] Images use HTML style and have alternative text
  • [X] Places where multiple code/command options are given have codetabs

In addition, please fill out the following to help reviewers understand this pull request:

Description

I love rich documentation. It's so satisfying to read something that details a new concept, shares examples and really sets me up to succeed. But I don't like it when said documentation introduces another idea and leaves me to my own devices to figure out how to do it.

Tonight I was reading about the different workflow patterns. In the fan-out/fan-in pattern, it explains how a series of parallel tasks can be completed at once, but then it leaves a note at the end: "While not shown in the example, it's possible to go further and limit the degree of concurrency using simple, language-specific constructs."

As it took me a minute to figure out a worthwhile .NET approach to doing this, I wanted to contribute it back so future me isn't left hanging. I leave it to others to figure out other language equivalents.

Issue reference

None - saw this in the docs and after determining a solution, wanted to contribute it back.

WhitWaldo avatar Jan 30 '24 08:01 WhitWaldo

Thanks for this contribution @WhitWaldo!

hhunter-ms avatar Jan 30 '24 15:01 hhunter-ms

@WhitWaldo friendly bump

hhunter-ms avatar May 02 '24 21:05 hhunter-ms

@hhunter-ms Updated the docs to reflect the example given in the SO post to include support for retaining a returned value for each of the tasks

WhitWaldo avatar May 03 '24 06:05 WhitWaldo

@WhitWaldo it looks like 1.13 was pulled into this PR, which is pointing into 1.12 - do you mind either reopening as a new PR, or somehow reverting the 1.13 merge?

hhunter-ms avatar May 06 '24 14:05 hhunter-ms