{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/3129","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/3129/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/3129/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/3129/events","html_url":"https://github.com/kripken/emscripten/issues/3129","id":54381757,"number":3129,"title":"Test emterpreter sync support","user":{"login":"kripken","id":173661,"avatar_url":"https://avatars.githubusercontent.com/u/173661?v=3","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-14T21:49:38Z","updated_at":"2015-01-16T06:35:27Z","closed_at":null,"body":"incoming branch now has support for async/sync code in the emterpreter. That is, when running in the emterpreter, you can write sync code like most programs do, with `sleep()` and such, and it can still work in a browser. The interpreter loop saves it's state, does a setTimeout, then rebuilds and resumes the state. For more details see https://github.com/kripken/emscripten/wiki/Emterpreter#synchronous-code\r\n\r\nThis might be useful to emulators, ccing some people: @dreamlayers, @caiiiycuk . So far I have some basic tests in the test suite that pass, and I tried SDL-Doom, which worked (even effects like wipe work, which are synchronous, and there was no need to use emscripten_set_main_loop etc.). But this probably needs a lot more testing.\r\n"},"comment":{"url":"https://api.github.com/repos/kripken/emscripten/issues/comments/70214199","html_url":"https://github.com/kripken/emscripten/issues/3129#issuecomment-70214199","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/3129","id":70214199,"user":{"login":"dreamlayers","id":1137396,"avatar_url":"https://avatars.githubusercontent.com/u/1137396?v=3","gravatar_id":"","url":"https://api.github.com/users/dreamlayers","html_url":"https://github.com/dreamlayers","followers_url":"https://api.github.com/users/dreamlayers/followers","following_url":"https://api.github.com/users/dreamlayers/following{/other_user}","gists_url":"https://api.github.com/users/dreamlayers/gists{/gist_id}","starred_url":"https://api.github.com/users/dreamlayers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreamlayers/subscriptions","organizations_url":"https://api.github.com/users/dreamlayers/orgs","repos_url":"https://api.github.com/users/dreamlayers/repos","events_url":"https://api.github.com/users/dreamlayers/events{/privacy}","received_events_url":"https://api.github.com/users/dreamlayers/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T06:35:27Z","updated_at":"2015-01-16T06:35:27Z","body":"Thanks for your quick fixes, you're amazing!\r\n\r\nI've managed to use a huge blacklist, which runs correctly but slowly as long as the CPU interpreter in the blacklist. With the CPU interpreter in the blacklist, it fails. I don't see how emscripten_sleep() could be called from the CPU interpreter with the way I'm trying to use it in my tests. I'm not sure how to examine what's going on and trial and error is getting frustrating so I'll give up on this for now."}}