GithubHelp home page GithubHelp logo

Comments (3)

kasperkarlsson avatar kasperkarlsson commented on May 29, 2024

The issue has been verified.

Patched in ad6b145 - if the delay is smaller than 0, the delay will simply be ignored. Can you verify that this resolves the issue on your end as well?

from caringcaribou.

timower avatar timower commented on May 29, 2024

Yes, works better now!
Still seems strange, either the timestamp is wrong or the order in the file is wrong.
Both of which indicate a bug no?

from caringcaribou.

kasperkarlsson avatar kasperkarlsson commented on May 29, 2024

The dump module previously ran a callback function which wrote to the dump file in a separate thread for each incoming message. Due to this, race conditions could occur; causing messages to be handled and logged in the wrong order.

This should no longer happen after changes introduced in 59a9bee, where the handling of incoming messages was refactored to run sequentially in a single thread instead.

To summarize the difference in behavior:

Old dump module structure:

  • Main thread sets up callback handler and then just hangs around consuming CPU while waiting for the user to terminate
  • For each incoming message, spawn another thread running a callback handler which will write the message to the file
  • The OS handles threading prioritization (usually within a single process, due to GIL) which may cause them to be run in another order than the messages were received in (i.e. a race condition)

New dump module structure (as of 59a9bee):

  • The main thread itself reads from the queue of incoming messages
  • Each message is processed and written to file in order

As such, the race condition which could cause messages to end up in the wrong order in the dump file should already be solved. Feel free to open a new issue if you encounter anything strange related to this.

from caringcaribou.

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.