#NEWLINE# def spawn( self , func , * args , **kwargs ) : #NEWLINE# #INDENT# 'Run `func` in its own GreenThread\n\n        The Result is available by iterating over the GreenPile object.\n\n        :param Callable func: function to call\n        :param args: positional args to pass to `func`\n        :param kwargs: keyword args to pass to `func`\n        ' #NEWLINE# self . used = True #NEWLINE# self . counter += 1 #NEWLINE# try : #NEWLINE# #INDENT# gt = self . pool . spawn ( func , * args , ** kwargs ) #NEWLINE# self . waiters . put ( gt ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . counter -= 1 #NEWLINE# raise