Before this would fail with an error that Mutex can't be marshalled.
This commit changes the logic so that marshalling will wait until the
future is finished and then marshals the object.
It also needs to define __setobj__ so it the object can be properly
unmarshalled.
This was discovered because an object containing a future was used in
Rails caching which uses Marshal.
Coverage increased (+0.8%) when pulling d591f92cad6b0741cc347fe69e1a2a50a939ee6a on dbussink:marshal_futures into acb9f95bfc0c823b4018a51a25b7e78f5cf5b6c9 on codegram:master.
Before this would fail with an error that Mutex can't be marshalled. This commit changes the logic so that marshalling will wait until the future is finished and then marshals the object.
It also needs to define
__setobj__
so it the object can be properly unmarshalled.This was discovered because an object containing a future was used in Rails caching which uses Marshal.