GithubHelp home page GithubHelp logo

Comments (6)

marcospb19 avatar marcospb19 commented on June 2, 2024 1

A few ways out of this:

  1. Regress decompression parallelism.
  2. Create a complex system separating the main thread from decompression and compression threads so they communicate via messages, and the main thread handles the logic of outputting and reading input, so this never happens.

The latter is optimal, Ouch needs to separate the text outputting from the compression/decompression threads to achieve better performance and fix #77.

However, we don't have the workforce available to do such a system and maintain it in the long run, this project is stalled already with easy-to-fix bugs, so imagine having complex ones.

@figsoda thoughts?

from ouch.

figsoda avatar figsoda commented on June 2, 2024 1

But how to stop output from other threads from getting in the way of Y/n prompts?

Good point, I don't think that's possible without having more complex system then

Do we stop all progress by holding a stderr lock?

I don't think it works just by holding the stderr lock. If you mean the static lock, I think that might have a performance implication if we have to check every time we print anything to stderr

from ouch.

figsoda avatar figsoda commented on June 2, 2024

2. Create a complex system separating the main thread from decompression and compression threads so they communicate via messages, and the main thread handles the logic of outputting and reading input, so this never happens.

If we want a simpler solution, we can probably just have a static lock for Y/n prompts

from ouch.

marcospb19 avatar marcospb19 commented on June 2, 2024

If we want a simpler solution, we can probably just have a static lock for Y/n prompts

But how to stop output from other threads from getting in the way of Y/n prompts?

Do we stop all progress by holding a stderr lock?

from ouch.

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.