summaryrefslogtreecommitdiff
path: root/tools/fmt_test.py
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-05-28 09:32:43 -0400
committerRyan Dahl <ry@tinyclouds.org>2019-05-29 07:53:39 -0400
commit53b6356ec5eac1c84610c2d2e75b527485c47f3c (patch)
treea89e769e4bf0c2b3fb719db6c2f6d2d2580e2a45 /tools/fmt_test.py
parent3c355c2b3296cb930c37de44634b479cd7230ed6 (diff)
Correct tokio_util::block_on() and op_fetch_module_meta_data
op_fetch_module_meta_data is an op that is used by the TypeScript compiler. TypeScript requires this op to be sync. However the implementation of the op does things on the event loop (like fetching HTTP resources). In certain situations this can lead to deadlocks. The runtime's thread pool can be filled with ops waiting on the result of op_fetch_module_meta_data. The runtime has a maximum number of threads it can use (the number of logical CPUs on the system). This patch changes tokio_util::block_on to launch a new Tokio runtime for evaluating the future, thus bipassing the max-thread problem. This is only an issue in op_fetch_module_meta_data. Other synchronous ops are truly synchornous, not interacting with the event loop. TODO comments are added to direct future development.
Diffstat (limited to 'tools/fmt_test.py')
0 files changed, 0 insertions, 0 deletions