1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00
denoland-deno/libdeno
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
..
binding.cc Map promises onto futures. 2018-09-09 18:47:22 -04:00
deno.h chore: move libdeno files to //libdeno/ 2018-08-19 11:27:47 -04:00
file_util.cc libdeno: add file utilities Dirname() and ExePath() 2018-08-26 18:27:23 +02:00
file_util.h libdeno: add file utilities Dirname() and ExePath() 2018-08-26 18:27:23 +02:00
file_util_test.cc Fix warnings. 2018-08-30 05:48:40 -04:00
from_filesystem.cc build: do not bake absolute paths into deno_ns 2018-08-26 18:27:23 +02:00
from_snapshot.cc chore: move libdeno files to //libdeno/ 2018-08-19 11:27:47 -04:00
internal.h format 2018-08-26 19:22:37 +02:00
libdeno_test.cc refactor: add and use libdeno.setGlobalErrorHandler instead of window.onerror 2018-08-26 11:03:41 -04:00
libdeno_test.js refactor: add and use libdeno.setGlobalErrorHandler instead of window.onerror 2018-08-26 11:03:41 -04:00
snapshot_creator.cc chore: move libdeno files to //libdeno/ 2018-08-19 11:27:47 -04:00
test.cc chore: move libdeno files to //libdeno/ 2018-08-19 11:27:47 -04:00