If i Cycle send a message through serial com. how could i use other functions at the same time

If i Cycle send a message through serial com. how could i use other functions at the same time.

For example when i enable a cycle send function. (like serial com send 0x80 100ms / period)

the python will be involved in this cycle. other function could not be used.

How do deal with this situation?

I don’t have any serial equipment to test it with, but there is an example of using pyserial in a wxPython application here: https://github.com/pyserial/pyserial/blob/7aeea35429d15f3eefed10bbb659674638903e3a/examples/wxTerminal.py