code: def serialize(self, f):
          
          s = self.router()
  
          @self.spawn
          def _():
              for f, a, kw, r in s.recver:
                  try:
                      r.send(f(*a, **kw))
                  except Exception, e:
                      r.send(e)
  
          def _(*a, **kw):
              r = self.pipe()
              s.send((f, a, kw, r))
              return r.recv()
  
          return _
docs: Decorator to serialize access to a callable *f*