We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大佬,我用了这种HWThrottleModeLeading模式,写了个代码想测试下连续点击的问题:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
大佬,我用了这种HWThrottleModeLeading模式,写了个代码想测试下连续点击的问题:
[self.testThrottler call];
[self.testThrottler call];
}
我在方法里连续调用了两次call想模拟连续点击的情况,发现还是连续调用了两次,应该是第二次call的时候dispatch_async的block还没执行,lastRunTaskDate没有更新:
dispatch_async(self.queue, ^{
if (self.taskBlock) {
self.taskBlock();
}
self.lastRunTaskDate = [NSDate date];
});
}
如果把 self.lastRunTaskDate = [NSDate date];放到dispatch_async外面是不是可以解决这个问题呢?
The text was updated successfully, but these errors were encountered: