Agent skill
PHP Concurrency
Handling concurrency and non-blocking I/O in modern PHP.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/concurrency
Metadata
Additional technical details for this skill
- labels
-
php concurrency fibers async
- triggers
-
{ "files": [ "**/*.php" ], "keywords": [ "Fiber", "suspend", "resume", "non-blocking", "async" ] }
SKILL.md
PHP Concurrency
Priority: P2 (MEDIUM)
Structure
src/
└── Async/
├── Schedulers/
└── Clients/
Implementation Guidelines
- Fibers: Use
Fiberfor low-level cooperative multitasking (8.1+). - Yield Control: Apply
Fiber::suspend()to yield within Fibers. - I/O Bound: Target I/O tasks only; avoid for CPU intensive work.
- Frameworks: Prefer Amp or ReactPHP for complex events.
- Self-Contained: Ensure Fibers manage their own state/exceptions.
- Incremental: Refactor single bottlenecks before full async.
Anti-Patterns
- Implicit Flows: No Deep Suspend: Keep Fiber logic traceable.
- Internal Blocking: No Blocking I/O: Don't block inside Fibers.
- Custom Schedulers: No DIY Schedulers: Use proven async libs.
References
- Fiber Implementation Guide
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?