#NEWLINE# @ classmethod #NEWLINE# def view( cls , * args , **kwargs ) : #NEWLINE# #INDENT# async = cls . meta . asynchronous #NEWLINE# request = http . Request ( path = kwargs . get ( 'path' , '' ) , asynchronous = async ) #NEWLINE# response = http . Response ( asynchronous = cls ) #NEWLINE# if async : #NEWLINE# #INDENT# import gevent #NEWLINE# gevent . spawn ( super ( Resource , cls ) . view , request , response ) #NEWLINE# return cls . stream ( response , response ) #NEWLINE# #UNINDENT# return super ( Resource , cls ) . view ( request , response )