Skip to content

Conversation

@madisonmay
Copy link
Owner

Example to test with:

from tomorrow import threads
from time import sleep

N = 2

# a `timeout` value is required in order to ensure that 
# execution periodically returns to the main thread
@threads(N, timeout=100)
def hanging_thread():
    while True:
        sleep(1)

if __name__ == "__main__":
    results = []
    for i in range(N):
        results.append(hanging_thread())

    for result in results:
        print result

TODO:

  • Add tests
  • Decide whether this behavior is desirable

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.

2 participants