-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Data race #145
Comments
aymanbagabas
added a commit
that referenced
this issue
Jul 28, 2023
Make output profile accessible through `ColorProfile`. Use `SetColorProfile` to change the output color profile. Use a mutex to guard output writes. Fixes: charmbracelet/lipgloss#210 Fixes: #145
aymanbagabas
added a commit
that referenced
this issue
Jul 28, 2023
Make output profile accessible through `ColorProfile`. Use `SetColorProfile` to change the output color profile. Use a mutex to guard output writes. Use pointer receiver Fixes: charmbracelet/lipgloss#210 Fixes: #145
aymanbagabas
added a commit
that referenced
this issue
Jul 28, 2023
BREAKING! `ColorProfile` reads the terminal environment every time the function is called. This is inefficient. We only need to read the `$TERM` environment variable once when we initialize the output. So we cache the value we read. Rename `ColorProfile` to `termColorProfile` and rely on `EnvColorProfile` to detect the profile. Ideally, we rely on the terminal Terminfo to detect the profile and fallback to the environment. Make output profile accessible through `ColorProfile`. Use `SetColorProfile` to change the output color profile. Use a mutex to guard output writes. Use pointer receiver since we have a lock in the struct Fixes: charmbracelet/lipgloss#210 Fixes: #145
aymanbagabas
added a commit
that referenced
this issue
Jul 28, 2023
`ColorProfile` reads the terminal environment every time the function is called. This is inefficient. We only need to read the `$TERM` environment variable once when we initialize the output. So instead, we cache the value we read. Rename `ColorProfile` to `termColorProfile` and rely on `EnvColorProfile` to detect the profile. Ideally, we would rely on the terminal Terminfo to detect the profile and fallback to the environment. But that's for another day :) Make output profile accessible through `ColorProfile`. Use `SetColorProfile` to change the output color profile. Use a mutex to guard output writes. Use pointer receiver since we have a lock in the struct Fixes: charmbracelet/lipgloss#210 Fixes: #145
aymanbagabas
added a commit
that referenced
this issue
Jul 28, 2023
`ColorProfile` reads the terminal environment every time the function is called. This is inefficient. We only need to read the `$TERM` environment variable once when we initialize the output. So instead, we cache the value we read. Rename `ColorProfile` to `termColorProfile` and rely on `EnvColorProfile` to detect the profile. Ideally, we would rely on the terminal Terminfo to detect the profile and fallback to the environment. But that's for another day :) Make output profile accessible through `ColorProfile`. Use `SetColorProfile` to change the output color profile. Use a mutex to guard output writes. Use pointer receiver since we have a lock in the struct Fixes: charmbracelet/lipgloss#210 Fixes: #145
aymanbagabas
added a commit
that referenced
this issue
Jul 28, 2023
Use a mutex to guard setting/getting the color profile and fg/bg colors. Use `SetColorProfile` to change the output color profile. Use pointer receiver since we have a lock in the struct. Fixes: charmbracelet/lipgloss#210 Fixes: #145
aymanbagabas
added a commit
that referenced
this issue
Jul 28, 2023
Use a mutex to guard setting/getting the color profile and fg/bg colors. Use `SetColorProfile` to change the output color profile. Use pointer receiver since we have a lock in the struct. Fixes: charmbracelet/lipgloss#210 Fixes: #145
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running currently latest wishlist serve with race flag, and connecting multiple clients to the server, then as i move the terminal data race happens
The text was updated successfully, but these errors were encountered: