# How do you use AsyncStream to make Task execution deterministic?

**URL:** <https://forums.swift.org/t/how-do-you-use-asyncstream-to-make-task-execution-deterministic/57968>\
**Category:** Using Swift\
**Tags:** concurrency\
**Created:** [June 10, 2022, 2:36am UTC](https://forums.swift.org/t/how-do-you-use-asyncstream-to-make-task-execution-deterministic/57968 "2022-06-10T02:36:29Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![tclementdev](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/tclementdev/32/13398_2.png) [@tclementdev](https://forums.swift.org/u/tclementdev)\
**Post date:** [June 11, 2022, 3:52pm UTC](https://forums.swift.org/t/how-do-you-use-asyncstream-to-make-task-execution-deterministic/57968/7 "2022-06-11T15:52:48Z")

</div>

> [@dimi](#):
>
> `os_unfair_lock_lock(&Global.lock)`

This isn't right. See [this](https://forums.swift.org/t/automatic-pointer-conversion-stable-addresses-for-stored-properties/57955/4).

---

_[View the full topic](https://forums.swift.org/t/how-do-you-use-asyncstream-to-make-task-execution-deterministic/57968)._
