Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

Don't let callback fire again until previous computation finished

Loving Dash so far. I have an app where the UI shows the result of an intensive computation whose parameters are dictated by some sliders/etc. When the sliders are changed, a callback fires to repeat the computation and update the UI.

# callback input: frontend changed; output: plots
def compute_hard_task_update_ui(params):
    return plots

I would like to prevent the computationally intensive callback from firing too often, ideally by waiting for a previous call to finish. This is particularly important because if the callbacks is fired too often, the app crashes with a segfault.