Created
December 20, 2011 14:58
-
-
Save shomah4a/1501845 to your computer and use it in GitHub Desktop.
thread + print
This file contains 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
#-*- coding:utf-8 -*- | |
import time | |
from pypy.module.thread import ll_thread | |
def add(x, y): | |
return x + y | |
def test(): | |
while 1: | |
print 10 | |
def main(argv): | |
print add(1, 2) | |
print add(1.0, 2.0) | |
print add(1.0, 1) | |
ll_thread.start_new_thread(test, ()) | |
time.sleep(10) | |
return 0 | |
def target(x, y): | |
return main, None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment