Skip to content

Conversation

@muukii
Copy link
Contributor

@muukii muukii commented Jun 14, 2025

Summary

  • Add ability to cancel tasks by specific key in TaskManager
  • Add corresponding method to SwiftUI's TaskManagerActorWrapper
  • Add tests to verify the new functionality

Changes

  • Added cancel(key:) method to TaskManagerActor
  • Added cancelTask(key:) method to TaskManagerActorWrapper
  • Added 3 test cases:
    • Verify that only tasks with the specified key are cancelled
    • Verify behavior when multiple tasks are queued with the same key
    • Verify that cancelling a non-existent key doesn't crash

Test plan

  • Verified all tests pass with swift test
  • Confirmed new test cases work as expected

🤖 Generated with Claude Code

- Add cancel(key:) method to TaskManagerActor for cancelling tasks with specific keys
- Add cancelTask(key:) method to TaskManagerActorWrapper for SwiftUI integration
- Add comprehensive tests for key-based cancellation functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@muukii muukii merged commit bb1a916 into main Jun 14, 2025
2 checks passed
@muukii muukii deleted the feature/add-key-based-cancellation branch June 14, 2025 01:09
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.

1 participant