UniTask icon indicating copy to clipboard operation
UniTask copied to clipboard

Add WhenAny(UniTask, UniTask) and WhenAll(UniTask, UniTask) overloads with 2-15 arguments

Open SolidAlloy opened this issue 4 years ago • 6 comments

Implements issue #262

  • made WhenAnyPromise and WhenAllPromise classes partial
  • added constructors with 2-15 arguments to WhenAnyPromise and WhenAllPromise
  • added UniTask.WhenAny(UniTask) and UniTask.WhenAll(UniTask) overloads with 2-15 arguments using those constructors
  • added unit tests for WhenAny and WhenAll methods with three arguments. Let me know if I should test more overloads.

SolidAlloy avatar Oct 14 '21 19:10 SolidAlloy

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jan 13 '22 00:01 github-actions[bot]

Reducing only the params (and adding a lot of overload for the sake of it) while allocation of the WhenAllPromise itself is not avoided does not look appealing. Let me think about this for a moment.

neuecc avatar Mar 02 '22 21:03 neuecc

Reducing only the params (and adding a lot of overload for the sake of it) while allocation of the WhenAllPromise itself is not avoided does not look appealing. Let me think about this for a moment.

it doesnt look appealing but thats sadly the cost of getting to 0 allocations. imo it shouldnt matter since this unappealing looking code shouldnt be seen by the end user of the library. it can be seen in other c# libs that reach for minimum allocations.

popcron avatar Mar 18 '22 23:03 popcron

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jun 17 '22 00:06 github-actions[bot]

while the idea looks cool. I don't understand why you did not sure params and an array. This way you only need one input. Would clean up the code by a lot

nolimet avatar Jun 22 '22 21:06 nolimet

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Sep 21 '22 00:09 github-actions[bot]