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

Consider moving to another thread locals library #694

Open
andrewshadura opened this issue Sep 10, 2024 · 1 comment
Open

Consider moving to another thread locals library #694

andrewshadura opened this issue Sep 10, 2024 · 1 comment

Comments

@andrewshadura
Copy link

The https://github.com/jtolio/gls module hasn’t been updated in the last 6 years. A currently maintained module, https://github.com/timandy/routine, seems like a more modern replacement.

Please consider moving to it. I tried looking into it myself, but my Go skills are insufficient.

@riannucci
Copy link
Collaborator

Is there an underlying bug you're encountering here?

The GLS library very specifically does not rely on the "unsafe" module, while the library you linked to does, which I think will make it unsuitable as a dependency for this project.

(GLS also has at least an order of magnitude less code than routine. Don't confuse "small and stable" with "out of date" :))

Aside: I think really the better thing to do in this modern age is to stop using "goroutine local storage" altogether.
The next evolution of goconvey should rely entirely on explicit context passing instead - hiding the test context in a global variable just ends up causing confusion and bugs :/... Unfortunately such a change will be backwards incompatible which is why I haven't implemented it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants