mudgen
8/12/2013 - 8:17 PM

Version of system.util.invokeAsynchronous() with arguments that get passed to the function.

Version of system.util.invokeAsynchronous() with arguments that get passed to the function.

def func(arg1,arg2):
  print arg1,arg2

def invokeAsynchWithArgs(func,*args):
  def asynchFunc(args=args,func=func):
    func(*args)
  system.util.invokeAsynchronous(asynchFunc)
		

invokeAsynchWithArgs(func, "cat","bat")