mimblewimble / cuckoo-miner

Mining wrapper around the Cuckoo Cycle proof of work system for the Grin/MimbleWimble blockchain.
Apache License 2.0
52 stars 16 forks source link

Fix lock and timing #18

Closed quentinlesceller closed 6 years ago

quentinlesceller commented 6 years ago

Currently the read lock is almost never dropped as it's held during the sleep time. So the write lock in the delegator to exit the main loop is never acquired. Also changed the wait time to limit lock contention. Ideally, it might be better to use an AtomicBool instead of locking the whole structure.