When one thread of my app encounter an error, the yellow bar always stop at a wrong place (where the UI thread pauses, I guess) and it is impossible to find out what caused the error.
The exception information in the log box is also wrong and helpless.
In most cases the libraries are responsible for handling background tasks and the developer code runs in the main thread. The debugger will not work properly with code that runs on other threads.
The thread is for socket communication. It initialize a socket, send data to server, receive data from server and process the data. This way can work with VB.NET.
How do you create the thread? With the Threading library?
I highly recommend you to use AsyncStreams instead. Once you learn how to work with it it is much simpler than handling the background threads yourself.
Yes. The Threading library.
AsyncStreams needs to start new thread too and it requires TWO threads.
The mechanism of the socket communication of my app is:
send, receive, send, receive ...
It has to start a new thread in order to avoiding freeze the main thread.
But I will consider AsyncStreams, if my app can't work in release mode.
It doesn't matter whether it starts a single thread or two threads. It happens only once. In most cases it is much simpler to use AsyncStreams then having to deal with the threading issues yourself.
But I will consider AsyncStreams, if my app can't work in release mode.
One of the concepts behind Basic4android is that the developer should not deal with multithreading issues. There is very good support for multithreading under the hood. These features are used by the libraries to handle background tasks.
As I previously wrote I recommend you to use AsyncStreams. It is very powerful and there are many examples in the forum about it.
Such concept sounds a little bit strange.
B4A is actually converting Basic code into Java code, and I am sure that Java suports multi thread. How come B4A can't support multi thread development?
My understanding is that B4A can not debug apps that have multi threads, but a multi thread app can still work smoothly after release.
Is my understanding correct?