sdk icon indicating copy to clipboard operation
sdk copied to clipboard

[SM-1413] Resolve Concurrency Issues in C FFI

Open coltonhurst opened this issue 6 months ago â€ĸ 2 comments

🎟ī¸ Tracking

https://bitwarden.atlassian.net/browse/SM-1413

📔 Objective

The Issue

Through the C FFI, we were running into concurrency issues with multiple Tokio runtimes.

A draft PR showing the concurrency issue with instructions can be found here.

The Fix

This PR fixes this issue for bitwarden-c and bitwarden-py, by preserving the runtime. Thanks @dani-garcia for the fix and working together on this one!

Extra

This also refactors the AccessTokenLogin type as a follow up for testing purposes for Go as initiated by this PR.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

đŸĻŽ Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹī¸ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠ī¸ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or â™ģī¸ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

coltonhurst avatar Aug 19 '24 15:08 coltonhurst