i=1
Thread.start{
while true
print "Thread 1 \n"
i+=1
if i==5 then
Thread.kill Thread.current
end
end
}
j=1
while true
print "Thread 2 \n"
j+=1
if j==4 then
Thread.exit
end
end
2022-04-24 21:32:56
i=1
Thread.start{
while true
print "Thread 1 \n"
i+=1
if i==5 then
Thread.kill Thread.current
end
end
}
j=1
while true
print "Thread 2 \n"
j+=1
if j==4 then
Thread.exit
end
end