Skip to content

Incorporate multithreading #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ace411 opened this issue Feb 24, 2025 · 1 comment
Closed

Incorporate multithreading #5

ace411 opened this issue Feb 24, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ace411
Copy link
Owner

ace411 commented Feb 24, 2025

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.

@ace411 ace411 added the enhancement New feature or request label Feb 24, 2025
@ace411 ace411 self-assigned this Feb 24, 2025
@ace411
Copy link
Owner Author

ace411 commented Mar 3, 2025

#6

@ace411 ace411 closed this as completed Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant