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
请问一下,在日志并发缓存队列中有一个 SWITCH 队列的用途是什么
//上一次写入是否完成 if (_lastReadFinished) { _lastReadFinished = false; //切换队列 Switch(); //取数据写入 QueueProcess(action); _lastReadFinished = true; }
发现可能是因为这里,造成高并发下,多任务持续写入日志的时候, 随机的发生任务死锁现象。 建议是否可以去除, 因为使用 ConcurrentQueue 原理上已经是支持并发状态下的先入先出功能了, 应该不需要进行读写切换。
The text was updated successfully, but these errors were encountered:
因为考虑到ConcurrentQueue容量有限,如果数据量偏大造成频繁扩容可能会有性能瓶颈,所以使用2个队列来处理,Switch方法是用来切换当前处理队列的。您说的死锁现象我会进一步测试观察下。
Sorry, something went wrong.
No branches or pull requests
请问一下,在日志并发缓存队列中有一个 SWITCH 队列的用途是什么
发现可能是因为这里,造成高并发下,多任务持续写入日志的时候, 随机的发生任务死锁现象。 建议是否可以去除, 因为使用 ConcurrentQueue 原理上已经是支持并发状态下的先入先出功能了, 应该不需要进行读写切换。
The text was updated successfully, but these errors were encountered: