Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't concurrently change output profiles
Multiple lipgloss renderer instances can end up using the same default termenv.Output. This leads to a race condition when manipulating the ColorProfile concurrently. We could mutex protect the standard output in termenv, but it feels like a weak promise, as the rest of the Output wouldn't (and probably shouldn't) get protected. Protecting it in lipgloss itself would require a global lock however. I can't come up with a proper use-case for this scenario, and therefore we shift this responsibility to the user.
- Loading branch information