TIPs for event driven programming:

  1. Always put IO in different thread, otherwise block the whole process.
  2. Never loop a contain that may protentially change during the loop. IF necessary, do a deepcopy
  3. Use locks to make sure evety thing is static during the handling the event.

In [ ]: