conradoqg / naivecoin

A cryptocurrency implementation in less than 1500 lines of code
Apache License 2.0
1.22k stars 319 forks source link

Mining Worker (worker.js & slave.js) Never Closes #56

Closed neurofluxation closed 6 years ago

neurofluxation commented 6 years ago

I think I have found a "memory leak" of sorts.

When the mining finishes, the worker/slave combo doesn't actually close the mining thread... Which causes this..

https://i.imgur.com/UmJESwc.png

So, the worker.js file has a "kill" function within them, but I can't figure out how to auto kill the process once mining has stopped (otherwise memory just fills up....)

Any ideas?

neurofluxation commented 6 years ago

No one know how to kill the slave/worker...?

conradoqg commented 6 years ago

I'll look into it.

neurofluxation commented 6 years ago

@conradoqg - I appreciate that mate. I've been looking for a while now. It means I can't run for any longer than my RAM allows, that is frustrating

🤣

conradoqg commented 6 years ago

Hey, fixed it in 9116c573641d77726b020b308c31f9726a5788fb

Thanks!

neurofluxation commented 6 years ago

@conradoqg - That's why you da man! Gracias amigo!