cryptimeleon / math

Library providing mathematical basics for (pairing-based) cryptography.
Apache License 2.0
10 stars 2 forks source link

Passing exceptions on group op worker threads to waiting threads. #134

Closed JanBobolz closed 3 years ago

JanBobolz commented 3 years ago

Previously, when an exception occured during some computation (say, you're trying to compute e(g2, g2)), the worker thread just swallowed the exception and the waiting (main) thread hangs forever, waiting for a result whose computation was aborted.

This often gave the appearance that the program hangs because some race condition appeared. The actual error was never actually displayed if the computation happened on a background thread.

With this pull request, any errors are now also passed to threads waiting for the computation to finish, so exceptions are now properly displayed and programs won't hang mysteriously anymore.