{"action":"opened","issue":{"url":"https://api.github.com/repos/kiliwalk/nbs/issues/1","labels_url":"https://api.github.com/repos/kiliwalk/nbs/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/kiliwalk/nbs/issues/1/comments","events_url":"https://api.github.com/repos/kiliwalk/nbs/issues/1/events","html_url":"https://github.com/kiliwalk/nbs/issues/1","id":107426464,"number":1,"title":"Return data from run()","user":{"login":"dr-dimitru","id":1686778,"avatar_url":"https://avatars.githubusercontent.com/u/1686778?v=3","gravatar_id":"","url":"https://api.github.com/users/dr-dimitru","html_url":"https://github.com/dr-dimitru","followers_url":"https://api.github.com/users/dr-dimitru/followers","following_url":"https://api.github.com/users/dr-dimitru/following{/other_user}","gists_url":"https://api.github.com/users/dr-dimitru/gists{/gist_id}","starred_url":"https://api.github.com/users/dr-dimitru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dr-dimitru/subscriptions","organizations_url":"https://api.github.com/users/dr-dimitru/orgs","repos_url":"https://api.github.com/users/dr-dimitru/repos","events_url":"https://api.github.com/users/dr-dimitru/events{/privacy}","received_events_url":"https://api.github.com/users/dr-dimitru/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-21T00:16:57Z","updated_at":"2015-09-21T00:16:57Z","closed_at":null,"body":"It is possible somehow return data from `run` method? Please, see code below:\r\n\r\n```js\r\nvar nbs = require('nbs'), wait = nbs.wait, resume = nbs.resume;\r\n\r\nfunction sleep(ms){\r\n  setTimeout(function(){\r\n    wait.return \"data\";\r\n  }, sec);\r\n  wait();\r\n}\r\n\r\ndata = nbs.run(function(){\r\n  return sleep(10);\r\n});\r\n\r\nconsole.log(data); // Outputs: 'data'\r\n```"}}