Monday, 17 April 2017

Interrupting a computationally intensive task

Suppose I have a Node program doing a computationally intensive task, say solving a Boolean satisfiability problem using the DPLL algorithm, could take a minute or a million years with no way of knowing which in advance, I want to set a timeout of one hour so if a solution isn't found by then, the task should be abandoned.

One way to do it would be to set a timer that calls process.exit.

Is there a way to interrupt a computationally intensive task but then continue in the same process, without exiting the process?



via rwallace

No comments:

Post a Comment