Join Slack
Powered by
<@U6BRLED33> But you should bear in mind that need...
# coroutines
g
gildor
01/15/2018, 2:37 AM
@eddy_wm
But you should bear in mind that need Thread.sleep only in one situation: if you want emulate blocking call or expensive computations
e
eddy_wm
01/15/2018, 7:36 AM
I am simulating some cryptographic block mining operations. Where you have to try something like this millions of times :
hash256 ( hash256 ( blockHeader + nonce++ ))
to find a certain hash under the difficulty target. Very common in crypto space with CPU mining algorithms.
g
gildor
01/15/2018, 7:39 AM
You should use separate disaptcher for that (coroutines abstraction for a thread pool)
Open in Slack
Previous
Next