Skip to content

Incorporate multithreading #5

@ace411

Description

@ace411

As presently constituted, the asyncify package relies primarily on child processes spawnable by the kernel. Though safe and sequestered from the userspace, child processes can be quite bulky for they are effectively duplicates of the runtime. Multithreading offers parallelism siloed to a single process, and when implemented per the rules of Communicating Sequential Processes (CSP), can allow for the sharing of state among atomic work units (threads). Currently, CSP is accessible in PHP via ext-parallel, and is primed for interoperability with ReactPHP by the suite of packages in reactphp-parallel the most recent release in which also offers the cooperative multitasking in the fiber spec.

The goal here is to instate multithreading in reactphp-parallel as the default mechanism for running blocking code in PHP in a non-blocking fashion with asyncify while retaining the child process approach as a fallback strategy.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions