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

Solución reto#21 Python #1364

Open
grisales54 opened this issue Oct 1, 2024 · 0 comments
Open

Solución reto#21 Python #1364

grisales54 opened this issue Oct 1, 2024 · 0 comments

Comments

@grisales54
Copy link

`import threading
from time import sleep
from concurrent.futures import ThreadPoolExecutor

def suma_retardada(n1:float, n2:float, time:float):

sleep(time)

suma = n1 + n2

return print(suma)

def llamar_suma(a:float,b:float, retar:float):

thread = threading.Thread(target=suma_retardada, args=(a, b, retar))
thread.start()

suma_retardada(1, 2, 3)
suma_retardada(2, 3, 4)
`

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

1 participant