c2pa-rs
c2pa-rs copied to clipboard
Rust library doesn't know about platform-specific thread handling
- The C2PA-iOS library wraps the prebuilt C library version of c2pa-rs
- The Rust code spawns threads, in particular for file hashing
- Those threads are always at the default priority level and don't respect the iOS thread priority levels
- This can cause, at very least, warnings in Xcode when a higher-priority thread waits on a lower-priority one
- It's fairly common to set a high priority for a user initiated action so this warning will show up regularly
- It's not likely to cause any kind of deadlock, but it does somewhat undermine the developer's chosen priority
I don't know that having the Rust library be aware of the threading details of the different platforms is ideal. But would it be possible to add a setting to disallow threads? It looks like there are already some places in the code where it will avoid spawning threads if it's WASM.
Issue initially reported here: https://github.com/contentauth/c2pa-ios/issues/30
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/CAI-10441 is successfully created for this GitHub issue.