Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the possibility of synchronous initialization #438

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Aug 20, 2022

  1. Added the possibility of synchronous initialization

    Prior to this commit, you could only initialize a queue in an asynchronous function. Now it is possible in synchronous, but you need to pass the event loop (even empty\not running) to the constructor
    s0d3s authored Aug 20, 2022
    Configuration menu
    Copy the full SHA
    2603f7b View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2023

  1. Configuration menu
    Copy the full SHA
    dc2fb08 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2023

  1. Added the possibility of lazy initialization of asynchronous parts of…

    … the Queue.
    
    The behavior of all functions after initialization has not changed. Also the duplicated code from `_notify_(a)sync_not_(empty/full)` was moved to a separate `_notify_(a)sync_condition` function. As a result, the bug that `_notify_sync_not_empty` did not add a handler to `_pending` was also fixed.
    
    Prior to full initialization, some `Queue` attributes are replaced with dummies. It is worth noting that `async_q` is replaced with an instance of the `PreInitDummyAsyncQueue` class before `Queue` is fully initialized. Although after full initialization, `Queue.async_q` is replaced by the desired object, it is worth remembering that the reference to `PreInitDummyAsyncQueue` obj could remain with the user. However, this is not a problem since after initialization, the dummy starts working as a proxy.
    s0d3s committed Mar 30, 2023
    Configuration menu
    Copy the full SHA
    01424a6 View commit details
    Browse the repository at this point in the history
  2. Added tests to check operation in partial and full initialization mod…

    …es (in various combinations)
    s0d3s committed Mar 30, 2023
    Configuration menu
    Copy the full SHA
    42dff2d View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2023

  1. Improve typing

    s0d3s committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    56b8761 View commit details
    Browse the repository at this point in the history
  2. Added one more test

    s0d3s committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    716df00 View commit details
    Browse the repository at this point in the history