Skip to content

Fix RSA resource cleanup and ESP32 Thread::cancel#1

Merged
valientegaston merged 2 commits intovalientegaston:fix-esp32-rsa-deadlockfrom
toitlang:rsa-resource-cleanup
Apr 7, 2026
Merged

Fix RSA resource cleanup and ESP32 Thread::cancel#1
valientegaston merged 2 commits intovalientegaston:fix-esp32-rsa-deadlockfrom
toitlang:rsa-resource-cleanup

Conversation

@floitsch
Copy link
Copy Markdown

@floitsch floitsch commented Apr 7, 2026

Summary

  • Add RsaGenerationResource_ class with finalizer/close pattern to ensure proper cleanup on exceptions (e.g. with-timeout)
  • Add rsa-generate-close primitive to tear down the resource group
  • Fix dangling proxy in rsa_generate_finish error paths (missing clear_external_address)
  • Add no-op Thread::cancel() for ESP32 (needed since async_posix is now compiled for ESP32)

See review discussion on toitlang#3018.

- Add RsaGenerationResource_ class with finalizer/close pattern to
  ensure proper cleanup of resource group and state on exceptions
  (e.g. with-timeout).
- Add rsa-generate-close primitive to tear down the resource group.
- Fix dangling proxy in rsa_generate_finish error paths by adding
  missing clear_external_address calls.
- Add no-op Thread::cancel() for ESP32 (required since async_posix
  is now compiled for ESP32).
@valientegaston valientegaston merged commit 0452296 into valientegaston:fix-esp32-rsa-deadlock Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants