{"issue":{"created_at":"2011-04-30T10:59:22Z","state":"closed","updated_at":"2011-11-25T05:21:39Z","user":{"gravatar_id":"e7ae6cbe101e61507a2b64eb86c83100","id":14032,"url":"https://api.github.com/users/dbrock","login":"dbrock","avatar_url":"https://secure.gravatar.com/avatar/e7ae6cbe101e61507a2b64eb86c83100?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":16,"body":"As far as I can tell, Vows currently does not support asynchronous teardowns. This becomes especially problematic because the `vows` program will shut down execution using `process.exit` before the teardown function has had a chance to finish its job.\r\n\r\nSince we cannot distinguish between synchronous and asynchronous using the return value as is done for topic functions (since teardown functions do not return anything), my patch utilizes the fact that we can at least detect when the teardown function grabs `this.callback`. This means that the teardown function must access `this.callback` before returning (i.e., synchronously), in order to signal to the framework that it has more work to do.","assignee":null,"id":833154,"number":82,"pull_request":{"patch_url":"https://github.com/cloudhead/vows/pull/82.patch","html_url":"https://github.com/cloudhead/vows/pull/82","diff_url":"https://github.com/cloudhead/vows/pull/82.diff"},"labels":[],"title":"Add support for asynchronous teardowns","closed_at":"2011-11-25T04:28:36Z","html_url":"https://github.com/cloudhead/vows/issues/82","url":"https://api.github.com/repos/cloudhead/vows/issues/82","milestone":null},"action":"created","comment":{"created_at":"2011-11-25T05:21:39Z","updated_at":"2011-11-25T05:21:39Z","user":{"gravatar_id":"57fb1693ee3a58df392438555e60ebbe","id":343979,"url":"https://api.github.com/users/ryanrolds","login":"ryanrolds","avatar_url":"https://secure.gravatar.com/avatar/57fb1693ee3a58df392438555e60ebbe?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Thank you for taking care of it. You guys are awesome.","id":2871458,"url":"https://api.github.com/repos/cloudhead/vows/issues/comments/2871458"}}