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-2248] dispatchQueue.async(flags: .barrier) shouldn't create a DispatchWorkItem #727

Closed
lilyball mannequin opened this issue Aug 1, 2016 · 2 comments
Closed

Comments

@lilyball
Copy link
Mannequin

lilyball mannequin commented Aug 1, 2016

Previous ID SR-2248
Radar None
Original Reporter @lilyball
Type Bug
Status Closed
Resolution Done
Environment

swift-DEVELOPMENT-SNAPSHOT-2016-07-29-a-139-g6b1210e

Additional Detail from JIRA
Votes 0
Component/s libdispatch
Labels Bug, SDKOverlay
Assignee @lilyball
Priority Medium

md5: a8c76b3235340891e802dd887881b85b

Issue Description:

We shouldn't be going through the overhead of creating a DispatchWorkItem (and calling dispatch_block_create_with_qos() just to submit a barrier block to a queue. In the case of queue.async(flags: .barrier, execute: ...) we should just call through to dispatch_barrier_async().

Not only that, but according to the code, on OS X 10.9 or iOS 7, queue.async(flags: .barrier) will completely ignore the flags, causing the code to submit a non-barrier block.

@lilyball
Copy link
Mannequin Author

lilyball mannequin commented Aug 2, 2016

Submitted as PR #3923.

@lilyball
Copy link
Mannequin Author

lilyball mannequin commented Aug 3, 2016

Merged in 5faa989.

@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

0 participants