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

Setup a faster, less footgun-prone API #105

Merged
merged 6 commits into from
Feb 3, 2024
Merged

Setup a faster, less footgun-prone API #105

merged 6 commits into from
Feb 3, 2024

Commits on Feb 3, 2024

  1. feat: Move EventListener back onto the heap

    Minimal amount of changes to make EventListener a heap-allocated type
    again. The existence of the EventListener implies that it is already
    listening; accordingly the new() and listen() methods on EventListener
    have been removed.
    
    cc #104
    
    Signed-off-by: John Nunley <[email protected]>
    notgull committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    fbc26e6 View commit details
    Browse the repository at this point in the history
  2. feat: Create Listener trait

    This commit creates the Listener trait and moves most of EventListener's
    functionality to that trait.
    
    Signed-off-by: John Nunley <[email protected]>
    notgull committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    eddd521 View commit details
    Browse the repository at this point in the history
  3. feat: Add stack-based listener

    It is instantiated with the listener!() macro.
    
    Signed-off-by: John Nunley <[email protected]>
    notgull committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    65c6f9a View commit details
    Browse the repository at this point in the history
  4. ex: Remove unsafe code from mutex example

    This brings in the try-lock dependency.
    
    Signed-off-by: John Nunley <[email protected]>
    notgull committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    585b549 View commit details
    Browse the repository at this point in the history
  5. feat: Move Future impl to forwarding macro

    Signed-off-by: John Nunley <[email protected]>
    notgull committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    053e6d1 View commit details
    Browse the repository at this point in the history
  6. chore: Polish the implementation of the new API

    * Make sure Unpin is implemented for StackListener
    * Purge the prelude
    * Remove unused imports from doctests
    
    Signed-off-by: John Nunley <[email protected]>
    notgull committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    d2a5e11 View commit details
    Browse the repository at this point in the history