我需要使函数 s_settings 不停止程序,我在异步函数中调用此函数,在set_settings我将数据send_settings发送到服务器时从服务器获取数据。我无法使方法(set_settings 和 send_settings)异步。但我需要使这个功能非阻塞def s_settings(id, _user_settings, all_settings): if 'category' in set_settings(str(id)): _user_settings[str(id)] = set_settings(str(id)) # Get from the Server print(user_settings) _user_settings[str(id)]['category'].append( all_settings[str(id)]['category']) _user_settings[str(id)]['time_to_receive'].append( all_settings[str(id)]['time_to_receive']) _user_settings[str(id)]['language'].append(all_settings[str(id)]['language']) send_settings(_user_settings[str(id)], str(id)) # Send to the server
添加回答
举报
0/150
提交
取消