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

fix: avoid race condition when starting bgw thread #785

Merged
merged 3 commits into from
Jan 9, 2023

Commits on Dec 26, 2022

  1. fix: avoid race condition when starting bgw thread

    - specifically on Windows: the `sentry_thread_spawn` macro is defined as follows:
    
    ```
    #    define sentry__thread_spawn(ThreadId, Func, Data)                         \
            (*ThreadId = CreateThread(NULL, 0, Func, Data, 0, NULL),               \
                *ThreadId == INVALID_HANDLE_VALUE ? 1 : 0)
    ```
    
    We can see that `ThreadId` is initialized with the value returned by
    `CreateThread`, but the new thread might be running before `CreateThread`
    returns.
    
    In this change a new function `sentry__thread_get_current_threadid` is
    added, which returns the current thread id in a reliable way.
    cnicolaescu committed Dec 26, 2022
    Configuration menu
    Copy the full SHA
    730f8fd View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2023

  1. Updated CHANGELOG.md

    cnicolaescu committed Jan 8, 2023
    Configuration menu
    Copy the full SHA
    78cdcf6 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2023

  1. Configuration menu
    Copy the full SHA
    7f44948 View commit details
    Browse the repository at this point in the history