Skip to content

[python] Fix thread pool with destructor#6396

Merged
wing328 merged 3 commits intoswagger-api:masterfrom
tuxbotix:threadPoolFix
Sep 1, 2017
Merged

[python] Fix thread pool with destructor#6396
wing328 merged 3 commits intoswagger-api:masterfrom
tuxbotix:threadPoolFix

Conversation

@tuxbotix
Copy link
Copy Markdown
Contributor

@tuxbotix tuxbotix commented Aug 28, 2017

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master for non-breaking changes and 3.0.0 branch for breaking (non-backward compatible) changes.

Description of the PR

Fix for #6392 .
Added following snippet to ApiClient class. The destructor close and join the ThreadPool.

def __del__(self):
  self.pool.close()
  self.pool.join()

@tuxbotix tuxbotix closed this Aug 28, 2017
@tuxbotix tuxbotix reopened this Aug 28, 2017
@tuxbotix tuxbotix changed the title Thread pool fix [python-client] Thread pool fix Aug 30, 2017
@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Aug 31, 2017

cc @scottrw93 @taxpon @frol @mbohlool

@frol
Copy link
Copy Markdown
Contributor

frol commented Aug 31, 2017

LGTM.

@wing328 wing328 merged commit a28ce0b into swagger-api:master Sep 1, 2017
@wing328 wing328 changed the title [python-client] Thread pool fix [python-client] Fix thread pool with destructor Sep 1, 2017
@wing328 wing328 changed the title [python-client] Fix thread pool with destructor [python] Fix thread pool with destructor Sep 1, 2017
wing328 added a commit that referenced this pull request Sep 1, 2017
wing328 added a commit that referenced this pull request Sep 1, 2017
…6421)

* Revert "Make the Rust codegen compile. (#6411)"

This reverts commit 60766c6.

* Revert "[Kotlin] Fix model enum generation (#6383)"

This reverts commit adf5d64.

* Revert "Global namespaces for ruby basic types (#6418)"

This reverts commit 070894d.

* Revert "add ehyche to swift tech comm"

This reverts commit 5c62ba1.

* Revert "[python-client] Thread pool fix (#6396)"

This reverts commit a28ce0b.

* Revert "update retrofit2 petstore samples"

This reverts commit 0f1a61d.

* Revert "Retrofit2: Return ResponseBody if response if file. (#6407)"

This reverts commit 481c040.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants