Skip to content

Make blocking public? #65

Closed
Closed
@zkat

Description

@zkat

Hi! I was using async-std in my cacache library. One of the things that I'm trying to do is implement AsyncWrite for it, but it turns out I'm using a tmpfile library that does sync i/o. Because of that, I pretty much copy-pasted the AsyncWrite impl for async-std's File, and it turns out with the latest version, task::blocking is now private, so I can't just... do that. (To clarify, I was using async-std pre-release, when I needed to use async-pool for this, and I just started porting the code over tonight when I ran into this).

For the sake of compatibility, it would be nice to have this available. My code that's doing this is over here, in case there turns out to be a Better Way™ to do what I'm trying to do that hopefully doesn't involve reimplementing tmpfile logic: https://github.com/zkat/cacache-rs/blob/zkat/async/src/content/write.rs#L147-L256

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    api designOpen design questionsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions