Android Question Is there a way to see the status of uncompleted "Resumable Subs" in the debugger?

fredo

Well-Known Member
Licensed User
Longtime User
The basic principle of the special feature has been understood and is used successfully and beneficially in small projects.
It has greatly improved the readability of the program structure.

However, I am not familiar with the exact mechanism under the hood, so I could not consider best practices on this.

In larger projects I now have an increasing number of places where "Sleep()" or "Wait for" is used and I'm not always sure if there might be unwanted effects caused by unskillfully placed "Sleep()" or "view.SetSomethingAnimated()".

For example, I noticed that the B4XLoadingIndicator did not appear "every now and then" after longer use of the app. Then a "Sleep(800)" before "B4XLoadingIndicator1.Show" helped and the effect did not appear anymore.

Is there a possibility to see how many unfinished calls are pending, e.g. in debugging mode?

I expect the information to indicate the necessity for corrective intervention.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
or example, I noticed that the B4XLoadingIndicator did not appear "every now and then" after longer use of the app.
This will never happen in B4XPages project.

It happens when the activity is paused and then resumed. Don't forget the code in Activity_Resume: https://www.b4x.com/android/forum/t...ingindicator-loading-indicator.92243/#content

Is there a possibility to see how many unfinished calls are pending, e.g. in debugging mode?
You should see a message in the logs about the sleep method not resumed due to the context being paused.
 
Upvote 0
Top