X Tutup
Skip to content

join() threads for a cleaner stop procedure#177

Merged
tsnoam merged 5 commits intopython-telegram-bot:masterfrom
tsnoam:master
Feb 19, 2016
Merged

join() threads for a cleaner stop procedure#177
tsnoam merged 5 commits intopython-telegram-bot:masterfrom
tsnoam:master

Conversation

@tsnoam
Copy link
Copy Markdown
Member

@tsnoam tsnoam commented Feb 9, 2016

plus some minor fixes / code cleanups

self.send_error(e.http_code)
self.end_headers()

def _validate_post(self):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I may be missing something, but this is not called, is it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

your eyes are working properly :)
i forgot to call self._validate_post() instead of the if statement in do_POST()

@tsnoam tsnoam force-pushed the master branch 2 times, most recently from 13da999 to 43dc151 Compare February 11, 2016 20:36
"""
global running_async, async_lock
thread = Thread(target=pooled, args=pargs, kwargs=kwargs)
uu = str(uuid.uuid1())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we still need this, or could we just go with the default thread name?

 - new book keeping of dispatcher's async threads so they can be joined
   when stopping
 - updater, webhook & dispatcher threads are now kept on
   Updater.__threads so they can be joined at the end

refs python-telegram-bot#175
tsnoam added a commit that referenced this pull request Feb 19, 2016
join() threads for a cleaner stop procedure
@tsnoam tsnoam merged commit 04c8681 into python-telegram-bot:master Feb 19, 2016
@python-telegram-bot python-telegram-bot locked and limited conversation to collaborators Feb 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup