padatious icon indicating copy to clipboard operation
padatious copied to clipboard

Replace multiprocessing with concurrent.futures

Open forslund opened this issue 3 years ago • 3 comments

Description

Multiprocessing pools can't safely be used in a threaded context in Python 3.9+. This replaces the multiprocessing Pool with a ProcessPoolExecutor from concurrent.futures. See https://github.com/MycroftAI/mycroft-core/issues/2799

Type of PR

  • [x] Bugfix
  • [ ] Feature implementation
  • [ ] Refactor of code (without functional changes)
  • [ ] Documentation improvements
  • [ ] Test improvements

Testing

Run together with PR https://github.com/MycroftAI/mycroft-skills-manager/pull/94 on python 3.9 and check that Mycroft doesn't throw exceptions when updating skills or training padatious.

forslund avatar Mar 18 '21 20:03 forslund

Will try to resolve the failing test the next coming days.

forslund avatar Mar 29 '21 07:03 forslund

Hello @forslund! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2021-04-04 09:13:31 UTC

pep8speaks avatar Apr 03 '21 09:04 pep8speaks

Got some feedback from @j1nx and this does not resolve the intended issue 100%

forslund avatar Apr 05 '21 14:04 forslund