charm4py icon indicating copy to clipboard operation
charm4py copied to clipboard

Add concurrent.futures.Executor implementation

Open nchristensen opened this issue 3 years ago • 9 comments

This adds a concurrent.futures.Executor implementation for Charm4py so Charm4py can be dropped in wherever ThreadPoolExecutor, ProcessPoolExecutor, MPI4pyPoolExecutor, etc. is used.

A PoolExecutor class in pool.py implements the Executor API by calling to equivalent Pool methods. This pull request also makes charm4py.threads.Future inherit from concurrent.futures.Future and implements its API.

TODO:

  • [ ] Fix Future.set_running_or_notify_cancel() and figure out where to call it. Execution currently hangs without explicitly calling Future.get().
  • [ ] Update dependencies
  • [ ] Update documentation
  • [ ] Add tests
  • [ ] Increment Charm4py version
  • [ ] Add _max_workers property to Executor

nchristensen avatar Nov 21 '22 07:11 nchristensen

This pull request introduces 2 alerts when merging 1b08833be5ccc06cd5e0a5f2eaa1042f37dfa5cc into 74791f9eb76b2f032615a1363441d25f8e4c57d2 - view on LGTM.com

new alerts:

  • 1 for Signature mismatch in overriding method
  • 1 for First parameter of a method is not named 'self'

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.

lgtm-com[bot] avatar Nov 21 '22 07:11 lgtm-com[bot]

This pull request introduces 2 alerts when merging 08cf569e62d65206deede09bfb31303104a35c02 into 74791f9eb76b2f032615a1363441d25f8e4c57d2 - view on LGTM.com

new alerts:

  • 1 for Signature mismatch in overriding method
  • 1 for First parameter of a method is not named 'self'

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.

lgtm-com[bot] avatar Nov 21 '22 20:11 lgtm-com[bot]

Hi Nick, This is some really cool work! I can help out later this week or early next week to help with testing and documentation.

ZwFink avatar Nov 21 '22 21:11 ZwFink

Cool, that would be great! It could definitely use another pair of eyes.

nchristensen avatar Nov 21 '22 21:11 nchristensen

This pull request fixes 1 alert when merging 9822860898f2afe22b0b2a3e4e2936b4dad065c3 into 74791f9eb76b2f032615a1363441d25f8e4c57d2 - view on LGTM.com

fixed alerts:

  • 1 for Illegal raise

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.

lgtm-com[bot] avatar Nov 22 '22 08:11 lgtm-com[bot]

This pull request fixes 1 alert when merging 282a11b237c293e60b42a4e2709f40f0255ed47f into 74791f9eb76b2f032615a1363441d25f8e4c57d2 - view on LGTM.com

fixed alerts:

  • 1 for Illegal raise

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.

lgtm-com[bot] avatar Dec 06 '22 06:12 lgtm-com[bot]

This pull request fixes 1 alert when merging b71e4b379ec218655c2d6a40437aeabc22305b24 into 74791f9eb76b2f032615a1363441d25f8e4c57d2 - view on LGTM.com

fixed alerts:

  • 1 for Illegal raise

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.

lgtm-com[bot] avatar Dec 06 '22 09:12 lgtm-com[bot]

This pull request introduces 7 alerts and fixes 2 when merging 081d3dca72370f52ab31658a4286414f861c9263 into 74791f9eb76b2f032615a1363441d25f8e4c57d2 - view on LGTM.com

new alerts:

  • 5 for Unused import
  • 2 for Unreachable code

fixed alerts:

  • 1 for Missing call to `__init__` during object initialization
  • 1 for Illegal raise

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.

lgtm-com[bot] avatar Dec 07 '22 01:12 lgtm-com[bot]

This pull request introduces 7 alerts and fixes 2 when merging 2bbb9a8af0cf76319e785304ae5b59cc2f346b61 into 74791f9eb76b2f032615a1363441d25f8e4c57d2 - view on LGTM.com

new alerts:

  • 5 for Unused import
  • 2 for Unreachable code

fixed alerts:

  • 1 for Missing call to `__init__` during object initialization
  • 1 for Illegal raise

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.

lgtm-com[bot] avatar Dec 07 '22 03:12 lgtm-com[bot]