git » pymisc » master » tree

[master] / samples / dataflow / sample2.py

import dataflow
import time


def show(v):
	print 'show() init + print'
	print 'show() v: ' + str(v)
	print 'show() done'

@dataflow.dataflow
def set():
	print 'set() init + sleep'
	time.sleep(1)
	print 'set() returns 3'
	return 3

v = set()
show(v)
show(v)