{"action":"created","issue":{"url":"https://api.github.com/repos/ewasm/design/issues/34","repository_url":"https://api.github.com/repos/ewasm/design","labels_url":"https://api.github.com/repos/ewasm/design/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/ewasm/design/issues/34/comments","events_url":"https://api.github.com/repos/ewasm/design/issues/34/events","html_url":"https://github.com/ewasm/design/issues/34","id":170472024,"number":34,"title":"Design a poll-based interface","user":{"login":"axic","id":20340,"avatar_url":"https://avatars.githubusercontent.com/u/20340?v=3","gravatar_id":"","url":"https://api.github.com/users/axic","html_url":"https://github.com/axic","followers_url":"https://api.github.com/users/axic/followers","following_url":"https://api.github.com/users/axic/following{/other_user}","gists_url":"https://api.github.com/users/axic/gists{/gist_id}","starred_url":"https://api.github.com/users/axic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axic/subscriptions","organizations_url":"https://api.github.com/users/axic/orgs","repos_url":"https://api.github.com/users/axic/repos","events_url":"https://api.github.com/users/axic/events{/privacy}","received_events_url":"https://api.github.com/users/axic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ewasm/design/labels/EEI%20(environment%20interface)","name":"EEI (environment interface)","color":"d93f0b"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-10T17:23:02Z","updated_at":"2016-09-13T21:08:17Z","closed_at":null,"body":"In case WASM will not support asynchronous methods we might need to take an alternative approach.\r\n\r\nA simple way is to have each operation work with polling, `storageLoad` would become:\r\n- `ethereum.storageLoad(args)`\r\n- `ethereum.storageLoadResult() -> i32` (where 1 means result is written to the specified memory location)\r\n\r\nAnd the following pseudocode in WASM:\r\n\r\n```\r\nethereum.storageLoad()\r\ndo { \r\n  result = ethereum.storageLoadResult()\r\n} while(!result)\r\n```\r\n\r\nThe JS interface would need to do the `sleep` then. It's not efficient at all, but there's no way to sleep in WASM."},"comment":{"url":"https://api.github.com/repos/ewasm/design/issues/comments/246824985","html_url":"https://github.com/ewasm/design/issues/34#issuecomment-246824985","issue_url":"https://api.github.com/repos/ewasm/design/issues/34","id":246824985,"user":{"login":"wanderer","id":158211,"avatar_url":"https://avatars.githubusercontent.com/u/158211?v=3","gravatar_id":"","url":"https://api.github.com/users/wanderer","html_url":"https://github.com/wanderer","followers_url":"https://api.github.com/users/wanderer/followers","following_url":"https://api.github.com/users/wanderer/following{/other_user}","gists_url":"https://api.github.com/users/wanderer/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderer/subscriptions","organizations_url":"https://api.github.com/users/wanderer/orgs","repos_url":"https://api.github.com/users/wanderer/repos","events_url":"https://api.github.com/users/wanderer/events{/privacy}","received_events_url":"https://api.github.com/users/wanderer/received_events","type":"User","site_admin":false},"created_at":"2016-09-13T21:08:17Z","updated_at":"2016-09-13T21:08:17Z","body":"related https://github.com/ewasm/ewasm-kernel/issues/2"}}
{"actor":{"display_login":"wanderer"}}