Android Activity返回键监听的两种方式 1.覆写Activity的OnBackPressed方法 官方解释: Called when the activity has detected the user's press of the back key. The default implementation simply finishes the current activity, but you can override this to do whatever you want.…
一.join控制子进程的一种方式 当主进程需要在子进程结束之后结束时,我们需要用到join来控制子进程. import time import random from multiprocessing import Process def func(index): time.sleep(random.random()) print('第%s个邮件已经发送完毕'%index) if __name__ == '__main__': p_list = [] for i in range(10): p =…