Git Product home page Git Product logo

Comments (9)

josevalim avatar josevalim commented on August 26, 2024

That's because the contents are too small. So everything is sent on a single batch, to a single producer/consumer, that can count it correctly. Can you please send a PR that adds this clarification to the docs? Thank you!

from flow.

Arkham avatar Arkham commented on August 26, 2024

Of course, do you think there is any way to show the advantage of using 'partition' in a simpler piece of code?

from flow.

josevalim avatar josevalim commented on August 26, 2024

from flow.

Arkham avatar Arkham commented on August 26, 2024

Unfortunately, you can only specify the max_demand when you use partition, so I just added a paragraph in the doc to explain that this can happen.

from flow.

josevalim avatar josevalim commented on August 26, 2024

@Arkham you can specify max_demand on from_enumerable. :) Can you please give it a try?

from flow.

josevalim avatar josevalim commented on August 26, 2024

I gave it a quick try locally and I got this by passing max_demand: 1 to from_enumerable:

[{"are", 1}, {"red\n", 1}, {"roses", 1}, {"are", 1}, {"blue\n", 1}, {"violets", 1}]

from flow.

Arkham avatar Arkham commented on August 26, 2024

Aha, that's really cool, I can add that to the doc. Should I remove the comment then?

from flow.

josevalim avatar josevalim commented on August 26, 2024

Closing this in favor of the PR anyway. :)

from flow.

josevalim avatar josevalim commented on August 26, 2024

I think you can keep your commend and show an example with max_demand: 1 to illustrate how you can reproduce it. :)

from flow.

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.