0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
denoland-deno/js
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
..
testing Add ability to unit test by permissions. 2018-08-27 17:51:24 -04:00
assets.ts Mark APIs at internal and include JSDoc in types 2018-09-05 08:45:55 -04:00
compiler.ts Add type aliases for sourceCode and outputCode 2018-09-09 10:51:15 -04:00
compiler_test.ts Fix TypeScript exports in bundle 2018-09-06 11:04:56 -04:00
console.ts Moved console tests to own file, and switched circular test to use stringify with assertEqual 2018-08-27 17:18:37 -04:00
console_test.ts Minor code refactoring 2018-09-01 21:59:52 -04:00
deno.ts lStat -> lstat 2018-09-04 15:57:18 -04:00
errors.ts Map promises onto futures. 2018-09-09 18:47:22 -04:00
fbs_util.ts Map promises onto futures. 2018-09-09 18:47:22 -04:00
fetch.ts Map promises onto futures. 2018-09-09 18:47:22 -04:00
fetch_test.ts Check allow-net in fetch 2018-09-06 11:07:10 -04:00
fetch_types.d.ts Minor code refactoring 2018-09-01 21:59:52 -04:00
global-eval.ts Mark APIs at internal and include JSDoc in types 2018-09-05 08:45:55 -04:00
globals.ts Bundle most types into globals.d.ts (#642) 2018-09-01 10:45:26 -04:00
libdeno.ts refactor: add and use libdeno.setGlobalErrorHandler instead of window.onerror 2018-08-26 11:03:41 -04:00
main.ts Map promises onto futures. 2018-09-09 18:47:22 -04:00
mock_builtin.js Replace packer with rollup 2018-07-22 03:16:17 +02:00
os.ts Add better assert message for CodeFetchRes 2018-09-09 18:47:22 -04:00
os_test.ts Format 2018-09-05 22:27:47 -04:00
plugins.d.ts Replace packer with rollup 2018-07-22 03:16:17 +02:00
test_util.ts Format. 2018-09-03 10:45:58 -04:00
text_encoding.ts Add TextEncoder/TextDecoder support. 2018-08-09 14:27:46 -07:00
timers.ts Map promises onto futures. 2018-09-09 18:47:22 -04:00
tsconfig.generated.json Mark APIs at internal and include JSDoc in types 2018-09-05 08:45:55 -04:00
types.ts Bundle most types into globals.d.ts (#642) 2018-09-01 10:45:26 -04:00
unit_tests.ts Reorganize js/unit_tests.ts 2018-08-30 14:41:55 -04:00
util.ts Map promises onto futures. 2018-09-09 18:47:22 -04:00
v8_source_maps.ts Mark APIs at internal and include JSDoc in types 2018-09-05 08:45:55 -04:00