# Use \`withThrowingTaskGroup\` within Actor leads to \`Non-sendable type '(inout ThrowingTaskGroup\<Void, any Error\>) async throws -\> ()'\` compilation warning

**URL:** <https://forums.swift.org/t/use-withthrowingtaskgroup-within-actor-leads-to-non-sendable-type-inout-throwingtaskgroup-void-any-error-async-throws-compilation-warning/60271>\
**Category:** Using Swift\
**Tags:** concurrency, actors\
**Created:** [September 13, 2022, 3:08pm UTC](https://forums.swift.org/t/use-withthrowingtaskgroup-within-actor-leads-to-non-sendable-type-inout-throwingtaskgroup-void-any-error-async-throws-compilation-warning/60271 "2022-09-13T15:08:31Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![wadetregaskis](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/wadetregaskis/32/8494_2.png) [@wadetregaskis](https://forums.swift.org/u/wadetregaskis)\
**Post date:** [March 6, 2024, 4:40am UTC](https://forums.swift.org/t/use-withthrowingtaskgroup-within-actor-leads-to-non-sendable-type-inout-throwingtaskgroup-void-any-error-async-throws-compilation-warning/60271/8 "2024-03-06T04:40:40Z")

</div>

> [@Jon\_Shier](#):
>
> Don't use `reduce` directly onto `group`. Accumulate the results, then reduce.

Why?

---

_[View the full topic](https://forums.swift.org/t/use-withthrowingtaskgroup-within-actor-leads-to-non-sendable-type-inout-throwingtaskgroup-void-any-error-async-throws-compilation-warning/60271)._
