Skip to content

Search cannot be canceled #4

@bllngr

Description

@bllngr

When a search is taking too long, it should be able to cancel it using Ctrl+C. This doesn't work (at least in Windows cmd/Powershell):

git_vanity.py DEC1A551F1ED
Attempting to find sha1 prefix `DEC1A551F1ED'
for commit `302e61425849fbfa779a9bb34a44673fe42cafbf'
[...]
Processing GS iteration 1
   Time:         0:00:00
   Last Speed:   N/A MH/s      (Avg: N/A MH/s)
   Tries remaining (optimistic):  100.000000% ...
   Chance (CDF):                  0.000000% ...
Processing GS iteration 11
   Time:         0:00:01.039226
   Last Speed:   40.4375 MH/s     (Avg: 40.3599 MH/s)
   Tries remaining (optimistic):  99.999985% ...
   Chance (CDF):                  0.000015% ...
From cffi callback <function _py_ref at 0x000001E8E92D6840>:
Traceback (most recent call last):
  File "C:\Python37\lib\site-packages\pyopencl\cffi_cl.py", line 72, in _py_ref
    @_ffi.callback('void*(void*)')
KeyboardInterrupt
Processing GS iteration 21
   Time:         0:00:02.065515
   Last Speed:   40.9083 MH/s     (Avg: 40.6127 MH/s)
   Tries remaining (optimistic):  99.999970% ...
   Chance (CDF):                  0.000030% ...

...and it just continues running. The only way to stop it is to kill the terminal or the python process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions