#NEWLINE# def spawn( func , * args , **kwargs ) : #NEWLINE# #INDENT# 'Passthrough method for eventlet.spawn.\n\n    This utility exists so that it can be stubbed for testing without\n    interfering with the service spawns.\n\n    It will also grab the context from the threadlocal store and add it to\n    the store on the new thread.  This allows for continuity in logging the\n    context when using this method to spawn a new thread.\n    ' #NEWLINE# _context = common_context . get_current ( ) #NEWLINE# @ functools . wraps ( func ) #NEWLINE# def context_wrapper( * args , **kwargs ) : #NEWLINE# #INDENT# if ( _context is not None ) : #NEWLINE# #INDENT# _context . update_store ( ) #NEWLINE# #UNINDENT# return func ( * args , ** kwargs ) #NEWLINE# #UNINDENT# return eventlet . spawn ( func , * args , ** kwargs )