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

[WIP] clean memoy on miner shutdown #1885

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

psychocrypt
Copy link
Collaborator

  • free host and device memory on shutdown
  • catch exceptions and try to do a clean shutdown (free mem)
  • add key q to close the miner
  • handle signals e.g. CTRL+C

solve #1880

- free host and device memory on shutdown
- catch exeptions and try to do a clean shurdown (free mem)
- add key `q` to close the miner
HAndle signals to close the miner
@@ -997,6 +1001,52 @@ void executor::print_report(ex_event_name ev)
printer::inst()->print_str(out.c_str());
}

void executor::shutdown()
{
// if shutdown is called the first time
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are calling this from different threads. bQuit needs to be atomic. pvThreads is not safe. Use signals instead and wait conditions instead of calls and busy waiting.

@psychocrypt
Copy link
Collaborator Author

psychocrypt commented Oct 10, 2018 via email

@fireice-uk
Copy link
Owner

@psychocrypt psychocrypt changed the title clean memoy on miner shutdown [WIP] clean memoy on miner shutdown Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants