Skip to content
New issue

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

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

Already on GitHub? # to your account

Why a lot of (maybe all) d3d/d2d/dwrite APIs are marked as unsafe? #2012

Closed
seungha-yang opened this issue Sep 8, 2022 · 1 comment
Closed
Labels
question Further information is requested

Comments

@seungha-yang
Copy link

Probably duplication of (or somewhat related to) #1506 and #1782

Feel free to close this issue if this is a kind of duplicated one (but I'm asking in directX scope fwiw).

The unsafe is because those APIs are not thread-safe? (ID3D11Device should be thread-safe by default, ID3D11DeviceContext requires serialization though, and similar rule is applied to d2d depending on the way of construction time flags), or is there other concern?

@kennykerr
Copy link
Collaborator

Mostly the unsafe exists on non-WinRT APIs as we don't know how to reason about the safety of the calls themselves. I would like to relax this restriction as the blanket policy on all Win32 APIs is overly restrictive.

See this comment: #1506 (comment)

@kennykerr kennykerr added the question Further information is requested label Sep 8, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants