Skip to content

Conversation

@neilkakkar
Copy link
Contributor

Fixes #16

Tested using example.py: it blocked when a valid personal API key was set, but doesn't anymore.

@neilkakkar neilkakkar requested a review from yakkomajuri May 14, 2021 11:14
Copy link
Contributor

@yakkomajuri yakkomajuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't worked in the codebase for a while, left one comment about flipping the daemon toggle

def __init__(self, interval, execute, *args, **kwargs):
threading.Thread.__init__(self)
self.daemon = False
self.daemon = True # Make daemon to not interfere with program exit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to enable this given we're now stopping the poller on exit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed.

It's only when we manually shut down the runner, that the onExit part is called.

In other cases, given nothing is actively running, we don't want poll to actively block exit (which is what it does when it's not a daemon thread).
The program automatically exits when the only things running are daemon threads.

@neilkakkar neilkakkar merged commit fe6d0dc into master May 17, 2021
@neilkakkar neilkakkar deleted the pollfix branch May 17, 2021 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature flag loading blocks python scripts from finishing

3 participants