Utility method should wait till some other process in progress
I have created one utility method to check given id exist some reference table or not. If exist the method return1 otherwise 0.
But some times the backed table data will be reload with another process (REST request) , on any point of time. This reload process max it will take 30 seconds.
My Requirement is , the utility method should wait , if table reload is in progress.
Could you give me any suggestion for this issue.