JKDBModel icon indicating copy to clipboard operation
JKDBModel copied to clipboard

异步update多条数据数据时,只update一条数据

Open Cz314 opened this issue 7 years ago • 1 comments

使用AFNetworking下载完成回到主线程update,同时下载多条,执行该方法都是提示“更新成功“,但表内model的property仅更新其中一条。是同时对表内单条数据进行处理的,请问有什么解决办法吗?

Cz314 avatar Aug 28 '18 03:08 Cz314

[manager downloadTaskWithReques:[..] progress:^{...} destination:^{...} completionHandler:^{ ... dispatch_async(dispatch_get_main_queue(), ^{ [model update]; }); }]; 多处调用此代码,实际仅更新一次

Cz314 avatar Aug 28 '18 03:08 Cz314