Last active
November 6, 2018 15:30
-
-
Save ulope/db811b6cf853ff267f27e4295bc4739e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This causes Python to crash with | |
# `SystemError: Objects/tupleobject.c:851: bad argument to internal function` | |
# within a few hundered iterations at most. Typically only a handful are needed though. | |
# Most likely reason is: https://bugs.python.org/issue15108 | |
from io import StringIO | |
import gevent | |
gevent.config.monitor_thread = True | |
# Silence monitor output | |
gevent.get_hub().exception_stream = StringIO() | |
def worker(): | |
i = 0 | |
while True: | |
tuple(j for j in range(5000000)) | |
i += 1 | |
print(i) | |
gevent.spawn(worker).join() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Traceback: