Compare commits
No commits in common. "a09ce39ac656f2b99eacda49605c60adab982a47" and "bae6b7b92edfada32e57fd975ef7452ea9105006" have entirely different histories.
a09ce39ac6
...
bae6b7b92e
|
@ -1,16 +0,0 @@
|
||||||
import threading
|
|
||||||
|
|
||||||
# mét-odo al que se va a aosciar el hilo
|
|
||||||
def SaludoHilo2():
|
|
||||||
print ('soy el hilo 2\n')
|
|
||||||
t3.start()
|
|
||||||
|
|
||||||
def SaludoHilo3():
|
|
||||||
print ('hola, soy el hilo 3\n')
|
|
||||||
|
|
||||||
# creamos un hilo asociado a una función
|
|
||||||
t3 = threading.Thread(target=SaludoHilo3)
|
|
||||||
t2 = threading.Thread(target=SaludoHilo2)
|
|
||||||
#
|
|
||||||
t2.start()
|
|
||||||
print ("hola, soy el hilo 1 y primero \n") #impresión en el hilo principal
|
|
|
@ -1,13 +0,0 @@
|
||||||
import threading
|
|
||||||
|
|
||||||
def escribeY():
|
|
||||||
for i in range(1000):
|
|
||||||
print ("y", end="",flush=True)
|
|
||||||
return
|
|
||||||
|
|
||||||
print ("INICIO")
|
|
||||||
t = threading.Thread(target=escribeY)
|
|
||||||
t.start()
|
|
||||||
|
|
||||||
for i in range(1000):
|
|
||||||
print ("X", end="",flush=True)
|
|
|
@ -1,4 +0,0 @@
|
||||||
def my_function(*child):
|
|
||||||
print("The youngest child is " + child[1])
|
|
||||||
|
|
||||||
my_function("a","b")
|
|
Loading…
Reference in New Issue