Comments (4)
As cqueues is targetted at working whether lua is embedded, or extended, users probably don't have the power to modify their lua installation.
In any case, the are few places in cqueues that a yield is inside of an iterator
socket:lines()
socket:accept()
It could be useful as a footnote, but as it is only relevant to an old lua release, I'm not sure if it makes sense going forward...
from cqueues.
On Wed, Jan 07, 2015 at 01:12:15AM -0800, Anders Bergh wrote:
The documentation says:
1.2.1 LuaJIT, Lua 5.2, Lua 5.3 cqueues principally targets Lua 5.2 and above. It???s not fully portable to Lua 5.1 because cqueues relies on ephemeron tables to prevent coroutine/controller reference cycles, and because Lua 5.1 does not support yielding from metamethods and iterators. LuaJIT removes the latter of these handicaps, and so cqueues targets LuaJIT secondarily.
Lua 5.1 with Coco (by the LuaJIT author himself) also removes the yield from metamethod/iterator handicap. Should the documentation mention this?
Lua 5.1 with Coco isn't technically Lua 5.1, it's a patched Lua 5.1. I'm
reticent to mention that it might work with a patched version of Lua. My
intention was to leave it implied that if a patched version can do the
things mentioned, it might work, but the burden is on the user to ensure
compatibility.
Even better IMO than Coco, which plays games with the C stack, is Rici
Lake's yieldable for loops patch:
http://lua-users.org/wiki/YieldableForLoops
Mike Pall adopted this approach for LuaJIT 2.0 and dropped Coco.
cqueues might work with a Lua 5.1 patched with Rici's code. I haven't tried,
though.
I'm not actually sure if cqueues still yields from any metamethods. That
part I might need to remove.
from cqueues.
btw, another 5.1 feature missing is __gc
on tables. This particularly matters in dns.resolvers.lua
from cqueues.
Closing for now because nothing concrete to resolve.
from cqueues.
Related Issues (20)
- ERROR: cqueue: attempt to yield across metamethod/C-call boundary HOT 6
- Consider removing the debian/ dir (or moving it to another place) HOT 1
- error thrown from sleep: attempt to call a userdata value HOT 3
- installing on debian 9 using luarocks 3.3 with lua 5.1 fails HOT 2
- The codes are so urgly!
- lua 5.1 can import cqueues, luajit cannot HOT 1
- lua 5.3 build failed HOT 1
- Lua 5.4 support HOT 1
- cqueues unusable on aarch64 under LuaJIT HOT 21
- cqueues.notify: removing file from notify object
- cqueues.lua:85 expected 1 arguments, got 5 HOT 4
- Nesting controllers / parent discovery HOT 2
- Luarocks install fails on arm64 mac HOT 4
- starttls issue (unable to update event disposition: No such file or directory) HOT 4
- cqueues fails install within a Docker image; states 5.2-1 version is provided, when 5.2 is required HOT 2
- Does not build on raspbian HOT 5
- undefined symbol:CRYPTO_set_locking_callback HOT 2
- Working on the arm-linux board , and the compile is so complex HOT 1
- Does not build on OpenBSD 7.2
- cqueues doesn't work on FreeBSD 13.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cqueues.