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

Heads-up and suggestions for improvements #25

Open
linkdata opened this issue Mar 29, 2023 · 1 comment
Open

Heads-up and suggestions for improvements #25

linkdata opened this issue Mar 29, 2023 · 1 comment

Comments

@linkdata
Copy link

This is a great package, but it was missing some features I needed and there were some low-hanging optimization fruit to pluck.
Rather than submitting a massive PR, I felt it was easier and faster to just clone and rewrite where needed. I give full credit to you for the original work, of course.

You might consider incorporating some of the changes made in the clone (https://github.com/linkdata/deadlock). Specifically
the use of runtime.CallersFrames to get correct line numbers, using build tags instead of Opts.Disable to avoid all overhead, leverage escape analysis for callers() to lower memory usage and maybe use of TryLock() for Go 1.18+.

@sasha-s
Copy link
Owner

sasha-s commented Mar 31, 2023

Changes look good.
Build tags — I know some folks are doing it manually now in their projects when using go-deadlock.

If you want to merge your changes in the original repo, I am happy to work with you (would need to clean up the readme).

if you want to keep it separate; it is also perfectly fine.

@linkdata

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