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

does not work #72

Open
viponedream opened this issue Nov 11, 2021 · 1 comment
Open

does not work #72

viponedream opened this issue Nov 11, 2021 · 1 comment

Comments

@viponedream
Copy link

import time
import timeout_decorator
import asyncio

@timeout_decorator.timeout(5, use_signals=False)
async def main():
asyncio.sleep(10)

if name == 'main':
asyncio.run(main())

@chirag127
Copy link

chirag127 commented Aug 26, 2022

import time
import timeout_decorator

@timeout_decorator.timeout(10)
def mytest():
    print("hello")
    for i in range(1, 10):
        time.sleep(1)
        print(f"{i}")
        try:
          mytest2()
        except:
          pass


@timeout_decorator.timeout(5)
def mytest2():
    print("hello")
    for i in range(1, 10):
        time.sleep(1)
        print(f"{i}")


if __name__ == "__main__":
    mytest()

I don't work for me too

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

No branches or pull requests

2 participants