Skip to content

0.0.38

Choose a tag to compare

@pomponchik pomponchik released this 24 Jun 14:54
92db105

The old wait mechanism was greatly simplified.

Previously, it was based on a mechanism similar to superfunctions: the wait() method for each token returned a special object that had a special finalizer triggered when the object was destroyed by the reference counting mechanism. The finalizer checked whether the object had been awaited, and if not, it launched a synchronous implementation of the wait.

A problem was discovered in the old mechanism: exception handling. In the event of early termination of the wait due to a timeout, the system was supposed to throw an exception; however, in this mechanism, this is impossible specifically within its synchronous part. For this reason, it was decided to temporarily abandon this optimization.

The old tests related to the wait mechanism have been temporarily moved to tests/skipped/sync_and_async_wait.

The new wait mechanism is now fully synchronous.