rfc:fiber
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:fiber [2018/04/17 23:52] – lvht | rfc:fiber [2018/06/10 12:07] – lvht | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2017-09-13 | * Date: 2017-09-13 | ||
* Author: Haitao Lv< | * Author: Haitao Lv< | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 81: | Line 81: | ||
=== Implementation Detail === | === Implementation Detail === | ||
- | In our simple implementation, | + | In our simple implementation, |
- | + | ||
- | Martin Schröder has another implementation at https:// | + | |
- | + | ||
- | + | ||
- | ^Property^Martin' | + | |
- | |Minimum Memory Usage|VM stack only (4 KB)|VM & C stack (4 KB + 4 KB)| | + | |
- | |Supported Architecturs|any platform supported by compiler|only x86 systems at this time| | + | |
- | |Yield in Internal Function|unsupported|supported| | + | |
- | |Yield in Iterator|unsupported|supported| | + | |
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 116: | Line 107: | ||
===== Open Issues ===== | ===== Open Issues ===== | ||
- | < | + | < |
- | </ | + | Martin Schröder is working on this at https:// |
- | Calling | + | And here is the comparison. |
+ | ^Property^Stackless | ||
+ | |1 Minimum Memory Usage|VM stack only (4 KB)|VM & C stack (4 KB + 4 KB)| | ||
+ | |2 Supported Architecturs|any platform|x86 at this time| | ||
+ | |3 Yield in Internal Function|unsupported|supported| | ||
+ | |4 Yield in Iterator|unsupported|supported| | ||
- | < | + | Stackless |
- | Offering methods like **Fiber:: | + | Native fibers are very platform-dependend |
- | And as a language feature, Fiber should only offer the essential API and let other works to the userland code. | + | < |
- | < | + | And as a language feature, Fiber should only offer the essential API. User can implement these methods in user land code easily. |
+ | |||
+ | < | ||
Both Ruby's Fiber and Lua's coroutine using the same **resume()** API to **init** and **resume** their coroutine. | Both Ruby's Fiber and Lua's coroutine using the same **resume()** API to **init** and **resume** their coroutine. | ||
- | |||
- | < | ||
- | |||
- | Introducing new keywords does not offer any essential benefit but only cause BC impact. | ||
- | |||
- | Both Ruby's Fiber and Lua's coroutine use method to pause and resume their coroutine. | ||
===== Unaffected PHP Functionality ===== | ===== Unaffected PHP Functionality ===== | ||
Line 141: | Line 133: | ||
===== Future Scope ===== | ===== Future Scope ===== | ||
- | This sections details areas where the feature might be improved | + | |
+ | Syntax like async/await can be implemented | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== |
rfc/fiber.txt · Last modified: 2018/06/12 07:40 by krakjoe