def inner(*args, **kwargs): pipein, pipeout = Pipe() in_thread(pipeout, *args, **kwargs) pipein.__name__ = function.__name__ return pipein