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

[core] fix exit handling of FiberState threads #45834

Merged
merged 3 commits into from
Jun 11, 2024

Commits on Jun 10, 2024

  1. [core] fix exit handling of FiberState threads

    Currently fiber_runner_thread_.detach() is called in Fiber.Join().
    But Fiber.Join() could be called multiple times.
    For example, ConcurrencyGroupManager could call Join() the same
    number of times as the number of workers.
    This could result in double detach() failure.
    
    detach() should be called after fiber_runner_thread_ was created.
    That's the right pattern to use std thread.
    
    Signed-off-by: hongchaodeng <[email protected]>
    hongchaodeng committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    bece54d View commit details
    Browse the repository at this point in the history
  2. add test

    Signed-off-by: hongchaodeng <[email protected]>
    hongchaodeng committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    ee93fd7 View commit details
    Browse the repository at this point in the history
  3. comment

    Signed-off-by: hongchaodeng <[email protected]>
    hongchaodeng committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    4623fe0 View commit details
    Browse the repository at this point in the history