Continuing the API soundness and safety investigation from #21, I have determined that the RenderDoc struct should not implement the Send and Sync auto traits because the trigger and stop capture APIs, both the single and multi-frame variants, are inherently serial in design. Having multiple threads attempting to access the entry point simultaneously, potentially interacting with the set_active_window() method to change the focus of the RenderDoc capture layer, is unsound behavior.
Despite being a breaking API change, unimplementing Send and Sync is critical to statically preventing the thread safety issues described above. This should be documented clearly in the CHANGELOG.md so users looking to upgrade may be aware of the change.
Continuing the API soundness and safety investigation from #21, I have determined that the
RenderDoc
struct should not implement theSend
andSync
auto traits because the trigger and stop capture APIs, both the single and multi-frame variants, are inherently serial in design. Having multiple threads attempting to access the entry point simultaneously, potentially interacting with theset_active_window()
method to change the focus of the RenderDoc capture layer, is unsound behavior.Despite being a breaking API change, unimplementing
Send
andSync
is critical to statically preventing the thread safety issues described above. This should be documented clearly in theCHANGELOG.md
so users looking to upgrade may be aware of the change.