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

Feature TaskManager Scheduler and Queue and Context Decorators for Timed and Cancellable #438

Merged
merged 32 commits into from
Sep 13, 2022

Commits on Sep 11, 2022

  1. Configuration menu
    Copy the full SHA
    c183ba1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dfd9eb2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dd88963 View commit details
    Browse the repository at this point in the history
  4. build: target ES2022

    CMCDragonkai committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    6a16034 View commit details
    Browse the repository at this point in the history
  5. feat: introducing Timer as an object for tracking setTimeout, to …

    …be used for async deadlines
    CMCDragonkai committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    2ef9a88 View commit details
    Browse the repository at this point in the history
  6. feat: introducing timed and cancellable decorators to automate as…

    …ynchronous deadlines and asynchronous cancellation
    CMCDragonkai committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    9cd5c25 View commit details
    Browse the repository at this point in the history
  7. fix: integrating Timer with PromiseCancellable from `@matrixai/as…

    …ync-cancellable`
    
    * added `isPromise`, `isPromiseLike`, `isIterable`, `isAsyncIterable` to detect async and generator interfaces
    * timed decorator works for regular values, `PromiseLike` and `Iterable` and `AsyncIterable`
    * introduced `ContextTimed` type and other `Context*` types
    * stack trace is refers when construction time, so decorator takes error class constructor
    CMCDragonkai committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    fb5189b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3ee78bf View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4c63ac8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    82eb029 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e0d7182 View commit details
    Browse the repository at this point in the history
  12. feat: introducing tasks domain for managing background asynchronous…

    … tasks
    
    * Created a `Plug` class for managing the locking of scheduling and queuing loops
    * Using `performance.now()` for acquiring the current time
    CMCDragonkai committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    4f8e834 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    ad8bffd View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ca4fee3 View commit details
    Browse the repository at this point in the history
  15. fix(tasks): changing TaskGroup to TaskPath as a alias for `LevelP…

    …ath`, `taskGroup` is refered to as `path` now
    tegefaulkes authored and CMCDragonkai committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    462c4f8 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8772157 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    af44659 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    5ffa6dd View commit details
    Browse the repository at this point in the history
  19. feat(tasks): centralising Queue and Scheduler into a single `TaskMana…

    …ger`
    
    * tasks can be cancelled at any stage: scheduled, queued or active
    * `TaskData` is suitable to be encoded into JSON and back
    * Graceful shutdown of `TaskManager`
    * `TaskHandler` gets `TaskInfo` as second parameter after the `ContextTimed`
    CMCDragonkai committed Sep 11, 2022
    Configuration menu
    Copy the full SHA
    e2852df View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    19fbf14 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    f62035b View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    9a0424d View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2022

  1. Configuration menu
    Copy the full SHA
    fb28a53 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6a63ac5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    03c973f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d3ec10a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2d57737 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    37733c4 View commit details
    Browse the repository at this point in the history
  7. fix(contexts): when timed decorator inherits timer and signal, it sho…

    …uld do nothing
    
    There are 3 properties for the `timed` wrapper:
    
    A. If timer times out, signal is aborted
    B. If signal is aborted, timer is cancelled
    C. If timer is owned by the wrapper, then it must be cancelled when the
    target finishes
    
    There are 4 cases where the wrapper is used and where the properties are
    applied:
    
      1. Nothing is inherited - A B C
      2. Signal is inherited - A B C
      3. Timer is inherited - A
      4. Both signal and timer are inherited - A*
    
    B and C are only applied to case 1 and 2, because that's when the `Timer`
    is owned by the wrapper.
    
    *Case 4 is a special case, because the timer and signal are inherited,
    so it is assumed that the handlers are already setup betwen the timer
    and signal.
    CMCDragonkai committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    d20fb50 View commit details
    Browse the repository at this point in the history
  8. feat(contexts): introducing timedCancellable decorator and HOF and …

    …factored out common functionality in contexts domain
    CMCDragonkai committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    eb4e287 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2022

  1. Configuration menu
    Copy the full SHA
    cc9920e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5647b39 View commit details
    Browse the repository at this point in the history