Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
David Smith
@Catfish_Man@mastodon.social  ·  activity timestamp 2 months ago

Periodic reminder that the rule Swift Concurrency imposes is "you cannot block a thread to wait for future async work", not "you cannot block a thread". The actual rule is much easier to comply with than the shorter version that gets mistakenly passed around.

Blocking a thread may or may not be the right design for your particular code, but it only violates language requirements if you wait for async work.

One is "might slow down other work", the other is "might never finish".

#swiftlang

  • Copy link
  • Flag this post
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.5 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login