diff options
author | Rodrigo Kumpera <kumpera@users.noreply.github.com> | 2018-02-23 02:24:01 +0300 |
---|---|---|
committer | Ludovic Henry <luhenry@microsoft.com> | 2018-02-23 02:24:01 +0300 |
commit | 0a8126c2094d2d0800a462d4d0c790d4db421477 (patch) | |
tree | efe4b999ed0ba78a9c10bf306f0c8a8e9ff10e83 /sdks/wasm/README.md | |
parent | f0b78251899a5d98f16f84ef53ec777102c29ace (diff) |
[WASM] Implement timers. (#7193)
* [wasm] Add server.py for those that want to experiment with streaming compilation.
* [wasm] Implement System.Threading.Timer.
Timer implementation is done in a somewhat convoluted way.
First, we change Timer to not depend on a scheduler thread.
What we do is call for the runtime to schedule a timed callback to be executed.
Next step, the runtime. We add enough plumbing to get this call to JS.
Finally, in JS we either call setTimeout or schedule it to be run on the next tick.
Oh, wait, timeouts are ignored on non-web environments? Yes, right now its only use case
is offline testing, so ain't no time to wait for all this timeouting.
Diffstat (limited to 'sdks/wasm/README.md')
-rw-r--r-- | sdks/wasm/README.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sdks/wasm/README.md b/sdks/wasm/README.md index 911dea16273..5dfbb99be2c 100644 --- a/sdks/wasm/README.md +++ b/sdks/wasm/README.md @@ -29,6 +29,9 @@ Once that's done, Start a web server from the SDK directory (where sample.html i python -m SimpleHTTPServer ``` +Unfortunately, the above http server doesn't give wasm binaries the right mime type, which disables WebAssembly stream compilation. +The included server.py script solves this and can be used instead. + Go to `locahost:8000/sample.html` and it should work. [1] https://github.com/kripken/emscripten |