Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-8582] waitUntilAllOperationsAreFinished does not work on Linux when queue contains async operations #3643

Closed
Frizlab opened this issue Aug 20, 2018 · 1 comment

Comments

@Frizlab
Copy link
Contributor

Frizlab commented Aug 20, 2018

Previous ID SR-8582
Radar None
Original Reporter @Frizlab
Type Bug
Status Resolved
Resolution Done
Environment

Swift version 4.2 (swift-4.2-CONVERGENCE)
Target: x86_64-unknown-linux-gnu

Tested on a Debian Stretch, with the Ubuntu 16.10 build. Latest CONVERGENCE to date.

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug, Linux
Assignee None
Priority Medium

md5: 7a54f49eca0db3556f3dffe3f99fa680

Issue Description:

When using an OperationQueue with the “pure” Swift Foundation, if the queue contains an asynchronous Operation, the waitUntilAllOperationsAreFinished method will not wait for the asynchronous operation to be over.

This is demonstrated in this project:
https://gitlab.com/frizlab-demo-projects/swift_operationqueue_test

To test, simply clone the project, and run swift run on a Linux machine. One test fails (testAsync).

I can add a unit test and make a pull request to Swift Foundation if needed. I’ve read the code, and to me it seems the implementation of the OperationQueue is to blame here.

@Frizlab
Copy link
Contributor Author

Frizlab commented Oct 16, 2019

Fixed in Swift 5.1

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant