A solution is to wrap the deferred in a datastructure, like an object,
list, set, or what ever you prefer.
On 10/08/2009, at 23.40, Martin Geisler wrote:
Janus Dam Nielsen <janus.niel...@alexandra.dk> writes:
Thanks for your thoughts on this.
You're welcome, it took a me a while to figure out what was wrong
I think the take-home message is that you have structured your code
in an unusual way. Whenever you add a callback to a Deferred but
referring to the Deferred inside the callback, then you're off
At least that's my experience :-)
Actually I think you are slightly off :)
Lets look at what the example does:
First, the Deferred a is created
Second, the callback r is created,
Third, a callback, append, is attached to a
Forth, r is added to values
Fifth, r is returned
What seems to be the problem is the returning of a deferred from a
callback in combination with holding on to a reference to it in the
Yes, when you return a Deferred, it loses its value. The value is
transferred to the other Deferred.
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
Janus Dam Nielsen
R&D SCIENTIST, PhD.
CENTRE FOR IT-SECURITY
THE ALEXANDRA INSTITUTE LTD.
T +45 42 22 93 56
viff-devel mailing list (http://viff.dk/)