I did it like this
var callInProgress = falsefunc call(){ if callInProgress == true{ return } callInProgress = true //Make it false when your task done}
it will not allow user to call the function one more time untill you make callInProgress false
This is the only thing working