{"id":18435902,"url":"https://github.com/parallel101/hw05","last_synced_at":"2025-04-07T20:32:25.407Z","repository":{"id":38442982,"uuid":"445063142","full_name":"parallel101/hw05","owner":"parallel101","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-08T14:58:45.000Z","size":7,"stargazers_count":7,"open_issues_count":36,"forks_count":66,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-23T00:07:39.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parallel101.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-06T06:18:37.000Z","updated_at":"2025-02-13T11:39:38.000Z","dependencies_parsed_at":"2023-01-21T13:03:28.741Z","dependency_job_id":null,"html_url":"https://github.com/parallel101/hw05","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallel101%2Fhw05","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallel101%2Fhw05/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallel101%2Fhw05/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallel101%2Fhw05/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parallel101","download_url":"https://codeload.github.com/parallel101/hw05/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247725537,"owners_count":20985722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T06:09:37.455Z","updated_at":"2025-04-07T20:32:24.856Z","avatar_url":"https://github.com/parallel101.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 高性能并行编程与优化 - 第0x讲的回家作业\n\n通过 pull request 提交作业。会批分数，但是：\n\n没有结业证书，回家作业仅仅作为评估学习效果和巩固知识的手段，不必为分数感到紧张 :)\n量力而行，只要能在本课中，学到昨天的自己不懂的知识，就是胜利，没必要和别人攀比。\n注意不要偷看别人的作业哦！\n\n- 课件：https://github.com/parallel101/course\n- 录播：https://space.bilibili.com/263032155\n\n作业提交时间不限 :) 即使完结了还想交的话我也会看的~ 不过最好在下一讲开播前完成。\n\n- 如何开 pull request：https://zhuanlan.zhihu.com/p/51199833\n- 如何设置 https 代理：https://www.jianshu.com/p/b481d2a42274\n\n## 评分规则\n\n- 完成作业基本要求 50 分（详见下方\"作业要求\"）\n- 能够在 PR 描述中用自己的话解释 25 分\n- 代码格式规范、能够跨平台 5 分\n- 有自己独特的创新点 20 分\n- 明显抄袭现象 -100 分\n\n## 作业要求\n\n修改 main.cpp，修复并改进其中的 HTTP 服务器：\n\n- 把 `login`, `register` 等函数变成多线程安全的 - 10 分\n- 把 `login` 的登录计时器改成基于 chrono 的 - 5 分\n- 能利用 `shared_mutex` 区分读和写 - 10 分\n- 用 `lock_guard` 系列符合 RAII 思想 - 5 分\n- 让 ThreadPool::create 创建的线程保持后台运行不要退出 - 15 分\n- 等待 tpool 中所有线程都结束后再退出 - 5 分\n\n并通过 `main()` 函数中的基本测试。\n\n## 关于内卷\n\n如果你把 map 改成了自己实现的基于 hash 的，甚至是用了 CAS 的。\n只要是在 **满足作业要求且不出错** 的基础上，这是件好事！\n老师会酌情加分，视为“独特的创新点”，但最多不超过 20 分。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparallel101%2Fhw05","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparallel101%2Fhw05","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparallel101%2Fhw05/lists"}