Created
August 22, 2011 16:57
-
-
Save denysonique/1162898 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Pajton: | |
import threading | |
from time import sleep | |
class watek(threading.Thread): | |
def __init__(self): | |
while(not sleep(3)): | |
print 'foobar' | |
watek() | |
# Wersja latwa do zrozumienia dla Pythonistow: | |
Thread.new() { | |
every 3.seconds { print 'foobar' } | |
} | |
# Wersja l33t Rubyist | |
Thread.new do | |
every 3.seconds { puts :foobar } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment