0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00
denoland-deno/src
Ryan Dahl 0d03fafbfe Map promises onto futures.
Refactors handlers.rs

The idea is that all Deno "ops" (aka bindings) should map onto
a Rust Future. By setting the "sync" flag in the Base message
users can determine if the future is executed immediately or put
on the event loop.

In the case of async futures, a promise is automatically created.
Errors are automatically forwarded and raised.

TODO:

- The file system ops in src/handler.rs are not using the thread pool
  yet. This will be done in the future using tokio_threadpool::blocking.
  That is, if you try to call them asynchronously, you will get a promise
  and it will act asynchronous, but currently it will be blocking.
- Handlers in src/handler.rs returned boxed futures. This was to make
  it easy while developing. We should try to remove this allocation.
2018-09-09 18:47:22 -04:00
..
deno_dir.rs Improve module resolution. 2018-09-05 22:27:23 -04:00
errors.rs First pass at HTTP imports 2018-08-23 09:41:08 -04:00
flags.rs Implementing --deps flag 2018-09-06 10:42:07 -04:00
fs.rs Downgrading tokio to registry version. 2018-08-30 08:29:28 -04:00
handlers.rs Map promises onto futures. 2018-09-09 18:47:22 -04:00
libdeno.rs Rename src/binding.rs -> src/libdeno.rs 2018-09-05 22:27:47 -04:00
main.rs Rename src/binding.rs -> src/libdeno.rs 2018-09-05 22:27:47 -04:00
msg.fbs Map promises onto futures. 2018-09-09 18:47:22 -04:00
net.rs Support https imports. 2018-08-30 08:29:28 -04:00
version.rs v0.1.3 2018-09-05 23:08:20 -04:00