thrasher-corp / gocryptotrader

A cryptocurrency trading bot and framework supporting multiple exchanges written in Golang.
MIT License
2.95k stars 793 forks source link

currency/manager: remove deadlock potential in concurrent operations #1545

Closed shazbert closed 1 month ago

shazbert commented 1 month ago

PR Description

Resolves intermittent deadlock observed in CI builds. Example

Type of change

Please delete options that are not relevant and add an x in [] as item is complete.

How has this been tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and also consider improving test coverage whilst working on a certain feature or package.

Checklist

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 37.77%. Comparing base (34ef09d) to head (4803a9c). Report is 1 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1545/graphs/tree.svg?width=650&height=150&src=pr&token=41784B23TS&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp)](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1545?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp) ```diff @@ Coverage Diff @@ ## master #1545 +/- ## ========================================== + Coverage 35.89% 37.77% +1.87% ========================================== Files 409 409 Lines 177453 147697 -29756 ========================================== - Hits 63699 55789 -7910 + Misses 105899 84044 -21855 - Partials 7855 7864 +9 ``` | [Files](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1545?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp) | Coverage Δ | | |---|---|---| | [currency/manager.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1545?src=pr&el=tree&filepath=currency%2Fmanager.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-Y3VycmVuY3kvbWFuYWdlci5nbw==) | `94.96% <100.00%> (+1.53%)` | :arrow_up: | ... and [386 files with indirect coverage changes](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1545/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp)