I've written a small python script to pause high cpu using processes when my laptop temperature increases too much (it really increases when i run cpu intensive code) and resume again when the temperature falls back to normal.
Hope someone finds this useful.
Anyway, i am searching for an existing proper solution to this. Does anyone know of such a software. Please let me know. Else i may keep using my own solution. Bug reports, patches welcome