Coder Social home page Coder Social logo

Flow Control about eternalterminal HOT 5 OPEN

bmaurer avatar bmaurer commented on June 20, 2024
Flow Control

from eternalterminal.

Comments (5)

bmaurer avatar bmaurer commented on June 20, 2024
$ et --version
et version 6.2.1

from eternalterminal.

MisterTea avatar MisterTea commented on June 20, 2024

ET has flow control but it's based on lines-per-second (currently set to 1024 lines-per-second):

https://github.com/MisterTea/EternalTerminal/blob/master/src/terminal/UserTerminalHandler.cpp#L110

In your example, there are no newlines so the flow control doesn't kick in. Feel free to change the logic to do roughly 80k characters per second and that would fix the example you posted.

from eternalterminal.

bmaurer avatar bmaurer commented on June 20, 2024

@MisterTea This also repros if you just run cat /dev/zero | base64, which has plenty of newlines.

from eternalterminal.

MisterTea avatar MisterTea commented on June 20, 2024

Oh, interesting! What happens if you compile with a much lower lines per second?

from eternalterminal.

bmaurer avatar bmaurer commented on June 20, 2024

Haven't had a chance to try out an end to end compile. This python script might be helpful though:

from datetime import datetime
while True:
  print(( datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f') + "\n") * 1000)

When run through ET, you can see that the time that gets printed out starts lagging real time. This suggests that ET is not putting back pressure on the stdout of the underlying process. OTOH with SSH directly, everything is in real time.

Intuitively, if you have a rate limit (ideally this would not be necessary. 1024 lines / second is rather slow if you cat a long file) you also need to put backpressure on the remote end. If you allow buffering, you are always going to be seeing old output, which means that a control-C can't take effect instantly.

from eternalterminal.

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.