A summary of Handler.
Message: contains the Message ID, the Message processing object, and the processed data. MessageQueue queues in a unified manner and is eventually processed by Handler.
Handler: the Handler responsible for sending and processing messages. When using Handler, you must implement the handleMessage (Message msg) method to process specific messages, such as updating the UI.
MessageQueue: a message queue used to store messages sent by Handler and run the messages according to FIFO rules. Of course, storing messages is not actually a matter of saving. Instead, messages are connected in a linked list, waiting for the logoff to be extracted.
Logoff: the Message pump constantly extracts messages from MessageQueue for execution. Therefore, a MessageQueue requires a logoff.
Thread: a Thread that schedules the entire message loop, that is, the execution location of the message loop.
Handler is responsible for pushing the data stack to the end of the Message team and extracting the data from the team header, while logoff is responsible for taking out the data from the queue cyclically and obtaining the Handler data. Note that the logoff must be the Logoff of the UI before we can update the UI!