def innerDecorator(func):

    def inner(*args, **kwargs):
        target = lambda : callback(func(*args, **kwargs))
t = threading.Thread(target=target)
t.setDaemon(daemonic)
t.start()
return inner
return innerDecorator

@threaded()
def get_webpage(url):
    data = urllib.request.urlopen(url).read()
print(data)
Reading a website with asyncore