Skip to content

Improve TimelineEventHandler's waits #983

@Erfan-Ahmadi

Description

@Erfan-Ahmadi

Context: https://discord.com/channels/593902898015109131/1443144692006129684/1458732737295810623

Currently we don't "bail" if the callbacks takes too long and cause us to pass the "waitPoint" deadline. instead we poll to exhaustion. we could improve this further by stopping the poll if we passed the waitPoint in the middle of for_each_popping or even the functors themselves.
Note: this improvement is independant of whether the functor returns bool or not (bailing vs non bailing)

  • two improvements could be made:
    • pass singleWaitTimePt to for_each_popping and the functors
    • be able to bail mid functor and keep the remainder of functor

then I guess we could rewrite both paths to:

  1. query the semaphore
  2. run all functors as at least timepoint bailing up to queried value
  3. wait for remaining signal values in order same as the bailing case

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions