or more correctly, def invert(f): def _i(*av, **kw) e = Event() result = [] def _s(res): result.append(res) e.set() def _f(): d = maybeDeferred(f, *av, **kw) d.addBoth(_s) reactor.callFromThread(_f) e.wait() res = result[0] if isinstance(res, Exception): raise res return res return _i should this function exist somewhere in twisted? -w