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
Hold coroutine when handler created in coroutine, fix #319 #335
Conversation
Can we remove the gettop() and assert? |
Ok, I will remove them and commit again. |
@@ -58,6 +59,13 @@ | |||
uv_handle_t* handle; /* The actual uv handle. memory managed by luv */ | |||
int refCount; /* a count of all pending request to know strength */ | |||
lua_State* L; /* L and ref together form a reference to the userdata */ | |||
int threadref; /* if handle is created in a coroutine(not main thread), threadref is |
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.
looks like spaces are needed?
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.
I add a field in struct uv_handle_t. or we throw an error when detected the handle created in a coroutine?
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.
My point is that there are tabs in the file instead of spaces :)
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.
I will replace spaces with tabs.
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.
put spaces!
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.
2012/8/29 Ryan Phillips notifications@github.com
In src/utils.h:
@@ -58,6 +59,13 @@
uv_handle_t* handle; /* The actual uv handle. memory managed by luv
/
int refCount; / a count of all pending request to know
strength /
lua_State L; /* L and ref together form a reference to the
userdata */
- int threadref; /* if handle is created in a coroutine(not main
thread), threadref isput spaces!
+1 for spaces!
Maybe we should write coding conventions for C.
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.
Sorry. I understand. :D
I added |
Hold coroutine when handler created in coroutine, fix #319
Thank you for the contribution. |
Hold coroutine when handler created in coroutine, fix luvit#319
R.T.