noxdafox / pebble

Multi threading and processing eye-candy.
GNU Lesser General Public License v3.0
536 stars 52 forks source link

BUG with ProcessPool when scheduled function raise BaseException #124

Closed sergeykk closed 10 months ago

sergeykk commented 10 months ago

In the following minimal snippet, f.result() hangs when scheduled function raises BaseException() . It works fine with concurrent.futures ProcessPoolExecutor

def test_pebble_exceptions():
    import pebble

    executor = pebble.ThreadPool()

    def foo():
        raise BaseException()

    try:
        f = executor.schedule(foo)
        f.result()
    except BaseException as e:
        assert isinstance(e, BaseException)
noxdafox commented 10 months ago

Issue fixed in release 5.0.6.