Comments (4)
我觉得你说的没问题,我当时没考虑效率,本身后来也想改但是老是偷懒,后面的lab也有一些很多可以优化的地方。就是用epoll监听定时任务,timerfd_create应该能创建定时任务,然后用epoll监听定时事件,应该没问题。顺便说一嘴,我现在好久没碰cpp了,gpt了一下发现有这个timerfd_create系统调用
from 6.824.
我觉得你说的没问题,我当时没考虑效率,本身后来也想改但是老是偷懒,后面的lab也有一些很多可以优化的地方。就是用epoll监听定时任务,timerfd_create应该能创建定时任务,然后用epoll监听定时事件,应该没问题。顺便说一嘴,我现在好久没碰cpp了,gpt了一下发现有这个timerfd_create系统调用
好的,非常感谢,确实如果从头开始做这个连框架和测试代码都没有的项目实在是太困难,有作者分享作为参考的确能少走很多弯路。
from 6.824.
加油
from 6.824.
之前读源码没仔细读,并不会阻塞主线程,因为该计时线程在 waitMap()
函数里中已经detach了,只会阻塞单独的计时线程。
from 6.824.
Related Issues (8)
- 请问这个对应哪一年那一季度的课程呢
- lab1中map执行失败的任务无法重新进行分配是啥原因?
- raft.cpp 函数appendEntries第629行if(m_logs.size() == 0) HOT 4
- raft.cpp 函数中的代码:https://github.com/tjumcw/6.824/blob/991d662ceaaa7308142f6103c4dd024ce49f534c/src/Raft/raft.cpp#L588是否写错了 HOT 3
- Feature request : Improving the implementation of timers in Lab1 HOT 5
- 关于shardkv中的问题 HOT 2
- 交流
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 6.824.