-
Notifications
You must be signed in to change notification settings - Fork 113
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
Should IDXGI*
types be marked as [Agile]
?
#1588
Comments
Sounds reasonable, thoughts @damyanp? |
I'm working on getting an answer to this, but it may take a few days. |
Word I've got back is that the IDXGI* interfaces are as agile as the D3D ones are. |
@damyanp lovely, thanks for getting back to me so quickly! (and concidentally right when I remembered I asked this question) Will you submit a PR adding this or should I? |
Happy to sign off on this as soon as your PR lands. Or Mike and I can take care of it too. |
Thanks! I'm unlikely to find time to work on this any time soon I'm afraid. |
Fixes microsoft#1588 Just like microsoft#740/microsoft#861 the `IDXGI*` interface classes should be marked as `Agile` so that `windows-rs` implements `Sync` and `Send` marker `trait`s for these `struct`s in Rust, allowing these types to be fearlessly shared across threads, and accessed from multiple threads at once: their implementations [are thread-safe]. [are thread-safe]: microsoft#1588 (comment)
Done in #1591: |
After patching up |
|
Strange, the regenerated branch has it working for |
@marignS95 And missing from IDWrite* interfaces, which is strange. Running through |
OK |
* Mark `IDXGI*` interfaces as `[Agile]` Fixes #1588 Just like #740/#861 the `IDXGI*` interface classes should be marked as `Agile` so that `windows-rs` implements `Sync` and `Send` marker `trait`s for these `struct`s in Rust, allowing these types to be fearlessly shared across threads, and accessed from multiple threads at once: their implementations [are thread-safe]. [are thread-safe]: #1588 (comment) * Updated the baseline. --------- Co-authored-by: Mike Battista <13860912+mikebattista@users.noreply.github.com>
#740 and #861 marked the
ID3D*
types[Agile]
to haveSend
andSync
in Rust because all these types are (supposedly) synchronized internally and thus thread-safe. Is the same true forDXGI
types, and if so can we add the same attribute to them too?The text was updated successfully, but these errors were encountered: