Browse Source

Deadlock fix.

cl-refactor
Gav Wood 10 years ago
parent
commit
0b502db361
  1. 2
      libethcore/Ethash.cpp

2
libethcore/Ethash.cpp

@ -255,6 +255,7 @@ public:
EthashCLHook(EthashCLHook const&) = delete;
void abort()
{
{
UniqueGuard l(x_all);
if (m_aborted)
@ -262,6 +263,7 @@ public:
// cdebug << "Attempting to abort";
m_abort = true;
}
// m_abort is true so now searched()/found() will return true to abort the search.
// we hang around on this thread waiting for them to point out that they have aborted since
// otherwise we may end up deleting this object prior to searched()/found() being called.

Loading…
Cancel
Save