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

Properly make core_text::font::Font be Send and Sync #348

Merged
merged 1 commit into from Nov 5, 2019

Conversation

@nox
Copy link
Member

nox commented Nov 5, 2019

The Apple documentation says:

All individual functions in Core Text are thread-safe. Font objects (CTFont,
CTFontDescriptor, and associated objects) can be used simultaneously by
multiple operations, work queues, or threads. However, the layout objects
(CTTypesetter, CTFramesetter, CTRun, CTLine, CTFrame, and associated objects)
should be used in a single operation, work queue, or thread.

https://developer.apple.com/documentation/coretext

@SimonSapin
Copy link
Member

SimonSapin commented Nov 5, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Nov 5, 2019

📌 Commit e44e30a has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Nov 5, 2019

Testing commit e44e30a with merge 3b0609c...

bors-servo added a commit that referenced this pull request Nov 5, 2019
Properly make core_text::font::Font be Send and Sync

The Apple documentation says:

> All individual functions in Core Text are thread-safe. Font objects (CTFont,
> CTFontDescriptor, and associated objects) can be used simultaneously by
> multiple operations, work queues, or threads. However, the layout objects
> (CTTypesetter, CTFramesetter, CTRun, CTLine, CTFrame, and associated objects)
> should be used in a single operation, work queue, or thread.

https://developer.apple.com/documentation/coretext
@nox
Copy link
Member Author

nox commented Nov 5, 2019

[nox:~/src/core-foundation-rs/core-text] backport-347
± cargo package
   Packaging core-text v13.3.2 (/Users/nox/src/core-foundation-rs/core-text)
   Verifying core-text v13.3.2 (/Users/nox/src/core-foundation-rs/core-text)
    Updating crates.io index
   Compiling core-foundation-sys v0.6.2
   Compiling libc v0.2.65
   Compiling bitflags v1.2.1
   Compiling foreign-types-shared v0.1.1
   Compiling foreign-types v0.3.2
   Compiling core-foundation v0.6.4
   Compiling core-graphics v0.17.3
   Compiling core-text v13.3.2 (/Users/nox/src/core-foundation-rs/target/package/core-text-13.3.2)
    Finished dev [unoptimized + debuginfo] target(s) in 4.51s

[nox:~/src/core-foundation-rs/core-text] backport-347 5s
± cargo build
   Compiling core-text v13.3.2 (/Users/nox/src/core-foundation-rs/core-text)
    Finished dev [unoptimized + debuginfo] target(s) in 0.37s

Wtf

The Apple documentation says:

> All individual functions in Core Text are thread-safe. Font objects (CTFont,
> CTFontDescriptor, and associated objects) can be used simultaneously by
> multiple operations, work queues, or threads. However, the layout objects
> (CTTypesetter, CTFramesetter, CTRun, CTLine, CTFrame, and associated objects)
> should be used in a single operation, work queue, or thread.

https://developer.apple.com/documentation/coretext
@nox nox force-pushed the backport-347 branch from e44e30a to e0ec957 Nov 5, 2019
@nox
Copy link
Member Author

nox commented Nov 5, 2019

Ok, I needed to cargo clean to repro (that sounds scary and I don't want to dwelve on it).

I've made the core-text-v13 branch start from the cocoa-v0.19.1 tag.

@SimonSapin
Copy link
Member

SimonSapin commented Nov 5, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Nov 5, 2019

📌 Commit e0ec957 has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Nov 5, 2019

Testing commit e0ec957 with merge b2b92f8...

bors-servo added a commit that referenced this pull request Nov 5, 2019
Properly make core_text::font::Font be Send and Sync

The Apple documentation says:

> All individual functions in Core Text are thread-safe. Font objects (CTFont,
> CTFontDescriptor, and associated objects) can be used simultaneously by
> multiple operations, work queues, or threads. However, the layout objects
> (CTTypesetter, CTFramesetter, CTRun, CTLine, CTFrame, and associated objects)
> should be used in a single operation, work queue, or thread.

https://developer.apple.com/documentation/coretext
@bors-servo
Copy link
Contributor

bors-servo commented Nov 5, 2019

☀️ Test successful - checks-travis
Approved by: SimonSapin
Pushing b2b92f8 to core-text-v13...

@bors-servo bors-servo merged commit e0ec957 into core-text-v13 Nov 5, 2019
3 checks passed
3 checks passed
Travis CI - Branch Build Passed
Details
Travis CI - Pull Request Build Passed
Details
homu Test successful
Details
@nox nox deleted the backport-347 branch Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.