GithubHelp home page GithubHelp logo

write_all about tokio-uring HOT 8 CLOSED

tokio-rs avatar tokio-rs commented on July 17, 2024
write_all

from tokio-uring.

Comments (8)

Noah-Kennedy avatar Noah-Kennedy commented on July 17, 2024 1

Currently working on a POC for this.

from tokio-uring.

Noah-Kennedy avatar Noah-Kennedy commented on July 17, 2024

@FrankReh I agree completely on a Write trait, as well as a Read trait. I think these should be called OwnedWrite and OwnedRead.

from tokio-uring.

FrankReh avatar FrankReh commented on July 17, 2024

Okay. I'll keep my write_all to myself for now, but it means my other work I wanted to commit as PRs is blocked because the test case(s) use the write_all. Your Owned{Write, Read} aren't blocked by my work so I'll wait for those traits to land.

BTW my write_all is a trivial modification to the write_all in std so you may be providing it yourself in OwnedWrite. No prob. In fact, I had to decide between basing the loop on the IoBuf or Slice type and I choose Slice for no real good reason. I was going to ask your opinion anyway.

from tokio-uring.

Noah-Kennedy avatar Noah-Kennedy commented on July 17, 2024

No, go ahead and open up a PR. I'm doing some refactoring right now in my PR and I don't want to block anyone with this.

from tokio-uring.

FrankReh avatar FrankReh commented on July 17, 2024

@Noah-Kennedy Just a reminder that ProvideBuffers will be very nice to support with this library. I don't know how that factors into your OwnedWrite and OwnedRead trait plans. Maybe they are orthogonal. Once I get the builder api for you to look at and perhaps approved, I'll see about a builder method that lets the caller either provide buffers or call out the library to allocate its own buffers. Of course ownership of the original buffer might make it hard for me to figure out how to provide both options so I may start with the library allocating the buffers, given parameters to a builder method.

The existing io-uring library supports buffers for reading and writing to files. Interesting as a first step, but using buffers to do multi recv and recvmsg is what's really interesting to me and that comes with the next kernel, 6.0, due in Oct, next month.

Maybe this deserves its own issue. Ownership and the drop method for these fixed buffers will be interesting.

from tokio-uring.

Noah-Kennedy avatar Noah-Kennedy commented on July 17, 2024

@FrankReh I think that we may need to add some additional buffer traits that abstract over things uring ops can use as buffers for use within op builders internally.

from tokio-uring.

FrankReh avatar FrankReh commented on July 17, 2024

@Noah-Kennedy I'm all ears. I've created #112 to discuss fixed buffers with a pbuf_ring feature introduced in 5.19. Maybe related to internal traits, maybe not.

from tokio-uring.

Noah-Kennedy avatar Noah-Kennedy commented on July 17, 2024

Thanks!

from tokio-uring.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.