Code Monkey home page Code Monkey logo

Comments (6)

peol avatar peol commented on September 10, 2024 2

Another reason why we might opt into using a default mixin (close() on Doc and Global): Since we may share the session/websocket between apps and global instances, doing .session.close() may break those other instances. Having a mixin that can track instances and close it once it goes down to 0 would solve that.

from enigma.js.

peol avatar peol commented on September 10, 2024

Yes, that's the current (and I think undocumented) way of doing it, it will trigger internal cleanup in enigma.js.

What do you think? I've been thinking about perhaps an app.close() and global.close() mixin, but perhaps closing it on session is good enough.

from enigma.js.

mindspank avatar mindspank commented on September 10, 2024

My gut feeling says session.close() is more obvious. If I would see app.close() I would also expect the application to purge from memory server-side

from enigma.js.

peol avatar peol commented on September 10, 2024

True, it could also be another method name though, like app.closeSession(), we'll look into what's better, there might be other things we'd like to expose on .session anyway and in that case it makes more sense to just document the existing method.

from enigma.js.

goldbergjeffrey avatar goldbergjeffrey commented on September 10, 2024

so I posted the question resolved here on another of @mindspank's questions, but now I have another question that may or may not be germain to this thread. How do I have multiple apps on one session with enigma? is it just a matter of extending the config and calling the qix function again with the updated config or is there some other magic involved?

from enigma.js.

peol avatar peol commented on September 10, 2024

@goldbergjeffrey Hi, see #38 (comment)

from enigma.js.

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.