axiom-assume-isolated

Access actor-isolated state synchronously when execution context is confirmed.

Updated Dec 3, 2025
One-click install
npx skills add https://github.com/tuliopc23/flying-dutchman-app --skill axiom-assume-isolated
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: axiom-assume-isolated
Source: https://github.com/tuliopc23/flying-dutchman-app/tree/main/.claude/skills/axiom-assume-isolated
Command: npx skills add https://github.com/tuliopc23/flying-dutchman-app --skill axiom-assume-isolated

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a way to synchronously access actor-isolated state when you are certain you are already on the correct actor's execution context, avoiding unnecessary async/await overhead.

Core Features & Use Cases

  • Synchronous Actor Access: Safely execute operations on an actor from within the actor's own context without await.
  • Testing: Ideal for testing code that relies on MainActor isolation without the overhead of Task.
  • Legacy Code: Useful for integrating with older delegate patterns that guarantee execution on a specific thread.
  • Performance-Critical Code: Reduces overhead in performance-sensitive sections by avoiding asynchronous hops.

Quick Start

Use MainActor.assumeIsolated to synchronously update the UI from the main thread.

Frequently Asked Questions about axiom-assume-isolated

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access Swift actor-isolated state synchronously in tests?

You can access actor-isolated state synchronously in Swift tests by confirming the current execution context is on the target actor's executor, avoiding unnecessary async/await overhead while directly interacting with the isolated data.

Can I update MainActor state without using async await in Swift?

Yes, you can update MainActor state without async/await by using assumeIsolated to synchronously execute operations when you are certain the code is already running on the main thread's execution context.

What is synchronous actor access used for in Swift concurrency?

Synchronous actor access in Swift is used to directly interact with actor state without asynchronous hops, solving performance overhead in critical code, simplifying testing scenarios, and integrating legacy callback patterns.

Does synchronous actor access work with legacy delegate patterns in Swift?

Yes, synchronous actor access works with legacy delegate patterns by allowing direct, non-async access to isolated data when the delegate guarantees execution is already happening on the specific actor's thread or executor.

When should I not use synchronous access for Swift actors?

You should not use synchronous access for Swift actors when you cannot guarantee the current execution context is on the target actor's executor, as violating this isolation requirement makes the synchronous access unsafe.

What is the best way to test MainActor isolation without Task overhead?

The best way to test MainActor isolation without Task overhead is to confirm you are on the main execution context and use assumeIsolated for direct, synchronous access to the isolated state during your test execution.