Giter VIP home page Giter VIP logo

Comments (6)

oberstet avatar oberstet commented on May 27, 2024

yes indeed: the attribute is initially set here

self._stopping = False

and before stopping starts it is set here

self._stopping = True

but it isn't reset once the stopping has finished (the component session left)

from autobahn-python.

oberstet avatar oberstet commented on May 27, 2024

I should note that even if the attribute would be reset correctly, you can't start the component again anyways, so the component object is for the bin, and the value of the attribute of a finished component is questionable .. in a way

from autobahn-python.

ninousf avatar ninousf commented on May 27, 2024

Why i can not restart a component ?
That's what i do in my code and it seems to work or i missed something

from autobahn-python.

oberstet avatar oberstet commented on May 27, 2024

Why i can not restart a component ?

as far as I see, there is no public API to restart

That's what i do in my code and it seems to work or i missed something

@meejah any hints from you side, is component supposed to be restartable? if so, how?

from autobahn-python.

ninousf avatar ninousf commented on May 27, 2024

True, it is not a plublic API

    joined = asyncio.Event()

    @comp.on_join
    def _(session, details):
        comp.session = session
        joined.set()

    loop = asyncio.get_event_loop()
    run_cb = autobahn.wamp.component._run(loop, comp)
    await joined.wait()

For me it is useful when you registered plenty of services but you just want disconnect/connect a component

from autobahn-python.

meejah avatar meejah commented on May 27, 2024

It's been a while since I've thought about Component ;) but I don't believe I considered re-starting.

The "state-machine" of Component is basically a one-way trip towards "done" currently .. although because clients have to allow the possibility of re-connect, it could certainly be possible to make "done -> start" a valid thing to do.

I'm not clear on the use-case: is it just to dis/re-connect? Or I guess, what does "re-starting" a component mean exactly?

from autobahn-python.

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.