Use __slots__, for minimal memory overhead.

main
Vincent Driessen 13 years ago
parent ced001cbb9
commit 0ff2984adf

@ -17,9 +17,11 @@ class DelayedResult(object):
self._rv = loads(rv) self._rv = loads(rv)
return self._rv return self._rv
class Job(object): class Job(object):
"""A Job is just a convenient datastructure to pass around job (meta) data. """A Job is just a convenient datastructure to pass around job (meta) data.
""" """
__slots__ = ['func', 'args', 'kwargs', 'rv_key', 'origin']
@classmethod @classmethod
def unpickle(cls, pickle_data): def unpickle(cls, pickle_data):

Loading…
Cancel
Save