Skip to content
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

Merged
merged 3 commits into from Aug 30, 2012

Conversation

AndrewTsao
Copy link
Contributor

R.T.

@travisbot
Copy link

This pull request passes (merged 93ab775 into 6727d4f).

@rphillips
Copy link
Member

Can we remove the gettop() and assert?

@AndrewTsao
Copy link
Contributor Author

Ok, I will remove them and commit again.

@travisbot
Copy link

This pull request passes (merged f36c77e into 6727d4f).

@@ -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
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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 :)

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put spaces!

Copy link
Member

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 is

put spaces!

+1 for spaces!
Maybe we should write coding conventions for C.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. I understand. :D

@travisbot
Copy link

This pull request passes (merged d016e25 into 6727d4f).

@AndrewTsao
Copy link
Contributor Author

I added set et to my .vimrc.

rphillips added a commit that referenced this pull request Aug 30, 2012
Hold coroutine when handler created in coroutine, fix #319
@rphillips rphillips merged commit 1f9c272 into luvit:master Aug 30, 2012
@rphillips
Copy link
Member

Thank you for the contribution.

zhaozg pushed a commit to zhaozg/luvit that referenced this pull request Apr 2, 2019
Hold coroutine when handler created in coroutine, fix luvit#319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants