GithubHelp home page GithubHelp logo

Comments (3)

siordache avatar siordache commented on August 25, 2024

I think this would be a nice feature.
I'm currently working on another project, which will keep me busy for several months.
Therefore, I put the label "up-for-grabs" on this issue, to indicate that this feature has been specifically chosen to be implemented by contributors.

Some guidelines for contributors:

  • Implementing this feature is not a trivial task, because Text-IO has not been designed to be thread-safe.

  • In order to avoid intermingling the messages printed by different threads, TextTerminal's print methods should not be allowed to run in parallel.

  • When a print method runs in parallel with a read method, an ideal implementation will allow specifying the desired behavior:

    1. (as requested by @asm0dey) Print the message and redraw the question.
      Take care to restore the properties that were in use by the initial call of the read method.
      Also take care of the partial input available at the moment when the read method has been interrupted.
    2. Postpone the print operation until after the end of the read operation.

    (It is OK to send a PR implementing only one of these two approaches, leaving the other one open for a future contribution.)

In order to prevent that two people work on the same thing, leave a comment here to claim this issue before starting to work on it.

from text-io.

ghandhikus avatar ghandhikus commented on August 25, 2024

Any plans on introducing it? This library is pretty useless without this feature.

from text-io.

siordache avatar siordache commented on August 25, 2024

Sorry, currently I have no time to implement this feature and no one stepped in to do this.
Would you be interested perhaps in sending a pull request for implementing this feature?

from text-io.

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.