Giter VIP home page Giter VIP logo

Comments (6)

Tom94 avatar Tom94 commented on September 26, 2024

Hi there, yes, this behavior is intentional: opening tev without any image arguments spawns a new window now (to allow people to open multiple instances side-by-side without passing images first). I think this is more intuitive than making $ tev a no-op if a window is already open.

That said, I hadn't considered the use-case of someone wanting to either open a tev render window or reusing an existing one if it's already there. I'll modify the CLI shortly to give you the option to revert to old behavior.

from tev.

Tom94 avatar Tom94 commented on September 26, 2024

(Extra background info: the IPC connection that you see in your console logs is intentional. Even when multiple windows of tev are open side-by-side, there is still only a single "primary" window that receives IPC data. When this window gets closed, one of the secondary windows automatically promotes itself to become the new primary.)

from tev.

KarelPeeters avatar KarelPeeters commented on September 26, 2024

Ah I see, that all makes sense but getting the old behavior back as an option would be very useful.

Could you elaborate on how the handover works when the primary window closes? I assume the original TCP socket still gets closed, and another instance opens a new one? Doesn't that kill exiting connections?

from tev.

Tom94 avatar Tom94 commented on September 26, 2024

Yeah, the TCP socket gets closed, existing connections are killed, and the first secondary instance that manages becomes a new host that listens on the same port.

Given that the new host is a genuinely different tev instance with different images & state, I think the reset of the connection makes more sense than trying to keep the existing connection alive.

from tev.

Tom94 avatar Tom94 commented on September 26, 2024

Of note: the intended function of this is that a subsequent $ tev image.exr doesn't spawn a new window if there are still existing ones -- i.e. as long as at least one instance of tev is running, one of them will handle IPC traffic.

As a corollary: the whole discussion concerns multiple tev instances that are bound to the same ip/port. If you were to spawn one regular tev instance and another via $ tev --host 127.0.0.1:1337, the second one would be its own independent primary instance.

from tev.

KarelPeeters avatar KarelPeeters commented on September 26, 2024

Great, thanks a lot for explaining and the new flag!

from tev.

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.