> php-concurrency
Handling concurrency and non-blocking I/O in modern PHP. Use when implementing concurrent requests, async processing, or non-blocking I/O in PHP. (triggers: **/*.php, Fiber, suspend, resume, non-blocking, async)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/php-concurrency?format=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
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)