{"action":"opened","issue":{"url":"https://api.github.com/repos/alexeypetrushin/synchronize/issues/47","repository_url":"https://api.github.com/repos/alexeypetrushin/synchronize","labels_url":"https://api.github.com/repos/alexeypetrushin/synchronize/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/alexeypetrushin/synchronize/issues/47/comments","events_url":"https://api.github.com/repos/alexeypetrushin/synchronize/issues/47/events","html_url":"https://github.com/alexeypetrushin/synchronize/issues/47","id":169735781,"number":47,"title":"Problem in using await","user":{"login":"anhldbk","id":3270746,"avatar_url":"https://avatars.githubusercontent.com/u/3270746?v=3","gravatar_id":"","url":"https://api.github.com/users/anhldbk","html_url":"https://github.com/anhldbk","followers_url":"https://api.github.com/users/anhldbk/followers","following_url":"https://api.github.com/users/anhldbk/following{/other_user}","gists_url":"https://api.github.com/users/anhldbk/gists{/gist_id}","starred_url":"https://api.github.com/users/anhldbk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anhldbk/subscriptions","organizations_url":"https://api.github.com/users/anhldbk/orgs","repos_url":"https://api.github.com/users/anhldbk/repos","events_url":"https://api.github.com/users/anhldbk/events{/privacy}","received_events_url":"https://api.github.com/users/anhldbk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-06T08:05:23Z","updated_at":"2016-08-06T08:05:23Z","closed_at":null,"body":"I have the code below:\r\n```js\r\nconsole.log('one');\r\n\r\nsync.fiber(function() {\r\n  var wait = function(callback){\r\n    setTimeout(function(){\r\n      console.log('two');\r\n      callback()\r\n    }, 1000)\r\n  }\r\n\r\n  sync.await( wait(sync.defer()) )\r\n\r\n});\r\nconsole.log('three');\r\n```\r\n\r\nI expect to have `one`, `two`, `three` printed out in order. But it's not:\r\n\r\n```sh\r\n$ node test.js\r\none\r\nthree\r\ntwo\r\n```\r\n\r\n@alexeypetrushin Would you please explain what wrong is? How to use `synchronize` right?"}}
{"actor":{"display_login":"anhldbk"}}