-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Update modules to be Lua coroutine compatible #1167
Conversation
@@ -121,12 +121,12 @@ static void net_socket_disconnected(void *arg) // tcp only | |||
if(nud->pesp_conn) | |||
c_free(nud->pesp_conn); | |||
nud->pesp_conn = NULL; // espconn is already disconnected | |||
lua_gc(gL, LUA_GCSTOP, 0); | |||
lua_gc(L, LUA_GCSTOP, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a matter of interest, why is the GC disabled here for a short time? I don't think that it needs to be..... [Worse, if it does need to be disabled, then the disable call is probably missing from lots of other places as well]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know. I could take a look but I think that I'll leave this until we fix the net
module properly.
These seem to be stable. Anyone found any probs? |
@dnc40085 @jmattsson @devsaurus @pjsg, you are the guys who have worked on these stacks in the past. This PR has been sitting here for 3 weeks. I am assuming that no one has any issues other than the merge conflicts created by later PRs that have been accepted as dnc40085 mentions. If I don't hear to the contrary in the next day or so, then I'll remove these conflicts and merge this PR myself. |
@pjsg Philip, it's a cludge, and it's used in a couple of other places in the module. The do
local svr = net.createServer(net.TCP)
srv:listen(888*,accept_cb)
end Here without this reference, the GC could clean up the socket after exiting the |
Happy to see this merged after conflicts resolved. |
Sorry guys, I am now on a Greek Island and my only access is by logging on from my local Taverna. I have also been fire-fighting an issue with a forum where I am an active contributor and it's gone belly-up because the sole-owner decided to take his ball and go home (shut it down). With most of the mods and senior contributors, I am trying to do a phoenix -- the only prob is that I am the only experienced Sysdmin / PHP programmer / MySQL admin so it is sucking up all of my spare time for next week or so. Juggling priorities and still trying to have a holiday. |
Should I recreate this PR with resolved conflicts? Have merged to my repo successfully, all seems OK. |
@djphoenix -- yes, please restage and we can get this squared away.... |
Changes as per #846. I still have to do fill testing. I can do the net, uart and wifi ones. COAP is pretty moribund anyway at the moment. This is more to provoke feedback comment than to merge just yet.