Method for processing high-concurrency IO based on PHP
An asynchronous processing and threading technology, applied in electrical digital data processing, program startup/switching, inter-program communication, etc., can solve problems such as wasting CPU resources, solve the problem of frightening herds, improve IO processing capabilities, and solve performance bottlenecks. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment
[0057] The scheduling of threads and processes is regulated by the operating system, while the scheduling of coroutines is regulated by the user. The coroutine scheduler of swoole can suspend the coroutine before coroutine A is about to enter the blocking IO operation, such as socket read (actually set to asynchronous IO), save the current stack information StackA, and then Switch to coroutine B, wait until the IO operation of coroutine A returns, and then switch back to the previous state of coroutine A at that time according to StackA.
[0058] S4. End the coroutine:
[0059] When the callback function is executed, the coroutine is terminated through the coro_close method.
[0060] The advantages of the present invention are:
[0061] The present invention uses the Swoole model, adds a multi-process Worker through a multi-threaded Reactor model (based on epoll), creates a coroutine in each thread, and processes IO tasks asynchronously through the coroutine scheduling, that i...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com