Deno: various async fs ops are not actually async

Created on 8 Sep 2020  路  4Comments  路  Source: denoland/deno

Example op_fdatasync_async

https://github.com/denoland/deno/blob/11afd071aec2d5ea6eb37a934c0835d8f6b1e764/cli/ops/fs.rs#L285-L300

This ought to be calling tokio::task::spawn_blocking.

op_stat_async is properly implemented
https://github.com/denoland/deno/blob/11afd071aec2d5ea6eb37a934c0835d8f6b1e764/cli/ops/fs.rs#L864-L886

bug cli good first issue help wanted l-rust

All 4 comments

This ought to be calling tokio::task::spawn_blocking.

Hmm I know I made them fake async (as in, not calling tokio::fs variants which are available) but this looks unfamiliar 馃
Do we want to just go for spawn_blocking here or all the way async?

These used to be blocking_json; I'll rewrite them as tokio::fs::File async calls.

Bit of churn recently in ops; I'll revisit once the interface has been the same for a couple of days in a row 馃槈

I can take a crack at this one

yeah as Casper said, I don't think this is really a "good first issue", clearly out of my comfort zone for now, if anyone else wants to take it 馃憤

Non trivial to fix at the moment until resource locks are sorted out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ry picture ry  路  3Comments

metakeule picture metakeule  路  3Comments

JosephAkayesi picture JosephAkayesi  路  3Comments

justjavac picture justjavac  路  3Comments

somombo picture somombo  路  3Comments