Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize auto-commit process #31

Merged
merged 4 commits into from
Jun 25, 2013
Merged

Optimize auto-commit process #31

merged 4 commits into from
Jun 25, 2013

Commits on Jun 11, 2013

  1. Spawn the commit thread only if necessary

    If there are no messages being consumed, the timer keeps
    creating new threads at the specified intervals. This may
    not be necessary. We can control this behaviour such that
    the timer thread is started only when a message is consumed
    mahendra committed Jun 11, 2013
    Configuration menu
    Copy the full SHA
    a4601d3 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2013

  1. Optimize auto-commit thread

    The previous commit optimized the commit thread such that the timer
    started only when there were messages to be consumed. This commit
    goes a step further and ensures the following:
    * Only one timer thread is created
    * The main app does not block on exit (waiting for timer thread to finish)
    
    This is ensured by having a single thread blocking on an event and
    keeps calling a function. We use events instead of time.sleep() so
    as to prevent the python interpreter from running every 50ms checking
    if the timer has expired (logic copied from threading.Timer)
    mahendra committed Jun 12, 2013
    Configuration menu
    Copy the full SHA
    b0c87ee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    28884c8 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2013

  1. Configuration menu
    Copy the full SHA
    119d411 View commit details
    Browse the repository at this point in the history