20d2bc99c9d41ff8f726708b69a34317a47e805b
[monitor.git] / Rpyc / Demo / testmodule.py
1 import time\r
2 from Rpyc.Factories import Async\r
3 \r
4 def threadfunc(callback):\r
5     """this function will call the callback every second"""\r
6     callback = Async(callback)\r
7     try:\r
8         while True:\r
9             callback()\r
10             time.sleep(1)\r
11     except:\r
12         print "thread exiting"\r
13 \r
14 def printer(text):\r
15     print text\r
16 \r
17 def caller(func, *args):\r
18     func(*args)\r
19