Access Busyness state
This guide addresses how to access the busy state.
Often an application will have longer running callbacks which are being processed on the server, to give users some indication that the server is busy you may therefore have some way of indicating that busy state. The pn.state.busy
parameter indicates whether a callback is being actively processed and may be linked to some visual indicator.
Below we will create a little application to demonstrate this, we will create a button which executes some longer running task on click and then create an indicator function that displays 'I'm busy'
when the pn.state.busy
parameter is True
and 'I'm idle'
when it is not:
This way we can create a global indicator for the busy state instead of modifying all our callbacks.