parameters: (self, func, args=None, kwargs=None)
return_statement: return t
docstring: Start 'func' in a new thread T, then start self (and return T).
docstring_summary: Start 'func' in a new thread T, then start self (and return T).
docstring_tokens: Start func in a new thread T then start self ( and return T ) .
function: def start_with_callback(self, func, args=None, kwargs=None):
          """Start 'func' in a new thread T, then start self (and return T)."""
          if args is None:
              args = ()
          if kwargs is None:
              kwargs = {}
          args = (func,) + args
  
          def _callback(func, *a, **kw):
              self.wait(states.STARTED)
              func(*a, **kw)
          t = threading.Thread(target=_callback, args=args, kwargs=kwargs)
          t.setName('Bus Callback ' + t.getName())
          t.start()
  
          self.start()
  
          return t
function_tokens: def start_with_callback ( self , func , args = None , kwargs = None ) : if args is None : args = ( ) if kwargs is None : kwargs = { } args = ( func , ) + args def _callback ( func , * a , * * kw ) : self . wait ( states . STARTED ) func ( * a , * * kw ) t = threading . Thread ( target = _callback , args = args , kwargs = kwargs ) t . setName ( 'Bus Callback ' + t . getName ( ) ) t . start ( ) self . start ( ) return t