Skip to content

Make publish function async#13

Open
edelabar wants to merge 5 commits into
BlueHouseLabs:mainfrom
alexito4:master
Open

Make publish function async#13
edelabar wants to merge 5 commits into
BlueHouseLabs:mainfrom
alexito4:master

Conversation

@edelabar

Copy link
Copy Markdown

From JohnSundell#141:

The internal semaphore used to make the CLI wait for publish to finish is no longer necessary and causes problems with concurrency. This PR removes it and makes the publish function async.

  • Is no longer necessary because Swift already supports async main, so one can build CLIs that use async and automatically await for the work to finish.
  • It cause problems because is blocking the main thread. If any async code needs to run on the MainActor this causes a deadlock.

@edelabar

Copy link
Copy Markdown
Author

I like the concept but it breaks the tests and it doesn't look like an easy fix so needs research...

@alexito4 alexito4 force-pushed the master branch 2 times, most recently from d76f9a0 to 58e9430 Compare June 9, 2023 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants