Skip to content

Instantly share code, notes, and snippets.

@denysonique
Created August 22, 2011 16:57
Show Gist options
  • Save denysonique/1162898 to your computer and use it in GitHub Desktop.
Save denysonique/1162898 to your computer and use it in GitHub Desktop.
#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