Git Product home page Git Product logo

Comments (8)

yangby-cryptape avatar yangby-cryptape commented on July 30, 2024 1

After test, I think it is hang at EventLoopHandle::Drop.

Move the event_loop into another thread and ignore it can avoid this bug (uncleanly exit?).

from rust-web3.

tomusdrw avatar tomusdrw commented on July 30, 2024

Good catch it's really interesting why it fails.

from rust-web3.

aleksuss avatar aleksuss commented on July 30, 2024

I have the same issue

from rust-web3.

aleksuss avatar aleksuss commented on July 30, 2024

FYI: But if I use an event loop from tokio everything is OK

from rust-web3.

yangby-cryptape avatar yangby-cryptape commented on July 30, 2024

Finally, I have known what happened.

It hangs at event_loop.turn(None);, before checking the done flag.

When we want to shutdown the event_loop, we stop send any new message, and set the done flag.
But the event_loop will check the done flag after next message, so it hangs at waiting for next message.
So, it hangs.

The simplest way (but stupid?) to fix this bug is: after set the done flag, send to it a new message.

from rust-web3.

tomusdrw avatar tomusdrw commented on July 30, 2024

Perhaps we could supply a timeout to turn?

from rust-web3.

synlestidae avatar synlestidae commented on July 30, 2024

@yangby-cryptape is correct I think. I added self.remote.spawn(|_| Ok(())) before the thread join. It seems to fix it on my end.

#144

from rust-web3.

tomusdrw avatar tomusdrw commented on July 30, 2024

Resolved via #144

from rust-web3.

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.