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

Fix for issue #3: create a stub class and singleton to represent main #16

Closed
wants to merge 1 commit into from

Conversation

samrushing
Copy link
Member

I've been running with this change for a week or two now.
The main hazard is that some bit of Python code might assume that current() == None implies main.
This will no longer be true.

…ent the 'main' coro. __yield on that object will raise YieldFromMain.
@samrushing
Copy link
Member Author

r.e. unit test, is this what you're asking for?

>>> import coro
>>> s = coro.tcp_sock()
>>> s.connect (('127.0.0.1', 80))
Segmentation fault: 11

markpeek added a commit to markpeek/shrapnel that referenced this pull request Jul 21, 2014
This is an updated patch from pull request ironport#16 which will throw an
exception if coro is called without starting the event_loop(). The
main update is to bring it up to date with recent changes and make
the linux poller throw the correct exception in this case.
markpeek added a commit that referenced this pull request Jul 23, 2014
This is an updated patch from pull request #16 which will throw an
exception if coro is called without starting the event_loop(). The
main update is to bring it up to date with recent changes and make
the linux poller throw the correct exception in this case.
@markpeek
Copy link
Member

Fix merged and pushed.

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.

3 participants