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

suspend PriorityQueue when no message is available(fix #14) #15

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Jul 14, 2024

  1. suspend PriorityQueue when no message is available(fix huiping192#14)

    Now PriorityQueue::deque() becomes async and always return MessageContainer and never return nil.
    When no message is available, sleep with withCheckedContinuation until new message is comming.
    
    With this change, HPRTMPExample CPU load becomes 14% for my iPhone 14 pro (previous: more than 100%).
    karino2 committed Jul 14, 2024
    Configuration menu
    Copy the full SHA
    2d5ebda View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

  1. Handle cancellation for waitable deque.

    Fix of [2d5ebda] does not handle task cancellation.
    withCheckedContinuation block forever, which cause memory leak.
    withTaskCancellationHandler break properly even if withCheckedContinuation is waiting.
    karino2 committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    9eb0204 View commit details
    Browse the repository at this point in the history