Open
Conversation
archibate
approved these changes
Jan 24, 2022
Contributor
archibate
left a comment
There was a problem hiding this comment.
- 把
login,register等函数变成多线程安全的 - 7/10 分 - 把
login的登录计时器改成基于 chrono 的 - 5/5 分 - 能利用
shared_mutex区分读和写 - 10/10 分 - 用
lock_guard系列符合 RAII 思想 - 5/5 分 - 让 ThreadPool::create 创建的线程保持后台运行不要退出 - 15/15 分
- 等待 tpool 中所有线程都结束后再退出 - 4/5 分
- 能够在 PR 描述中用自己的话解释 20/25 分
- 代码格式规范、能够跨平台 5/5 分
- 有自己独特的创新点 8/20 分
使用了链表很有创意!实际上用 vector 遍历,最后再 clear 一下就可以了 :)
Comment on lines
+46
to
+47
| } | ||
| { |
Contributor
There was a problem hiding this comment.
这两个锁的区域之间 has_login 有可能会被改动哦,需要第二个锁区域二次判断,或者合并为一个写锁的锁区域。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
完成了基本的作业要求,没有参加内卷:(