Redis是单线程的,那么它如何并行I / O?(Redis is single-threaded, then how does it do concurrent I/O?)
尝试了解Redis的一些基础知识我遇到了一个有趣的博文 。
作者说:
Redis是单线程的,具有epoll / kqueue,并且在I / O并发方面无限大。
我肯定会误解整个线程的事情,因为我觉得这个说法令人费解。 如果一个程序是单线程的,它是如何同时执行的? 为什么这么大的Redis操作是原子的,如果服务器是单线程呢?
有人可以请问这个问题吗?
Trying to grasp some basics of Redis I came across an interesting blog post .
The author states:
Redis is single-threaded with epoll/kqueue and scale indefinitely in terms of I/O concurrency.
I surely misunderstand the whole threading thing, because I find this statement puzzling. If a program is single-threaded, how does it do anything concurrently? Why it is so great that Redis operations are atomic, if the server is single-threaded anyway?
Could anybody please shed some light on the issue?
原文:https://stackoverflow.com/questions/10489298
最满意答案
您必须将原始存储库(您分配的存储库)添加为远程。
从GitHub fork手册页 :
克隆完成后,您的repo将有一个名为“
origin
”的远程指向您在GitHub上的分支。
不要让这个名字混淆你,这并不表示你从原来的回购。 为了帮助您跟踪该repo,我们将添加另一个名为“上游”的远程:$ cd github-services $ git remote add upstream git://github.com/pjhyett/github-services.git $ git fetch upstream # then: (like "git pull" which is fetch + merge) $ git merge upstream/master master # or, better, replay your local work on top of the fetched branch # like a "git pull --rebase" $ git rebase upstream/master
你也有一个红宝石宝石,可以促进这些GitHub操作 。
另请参见“ Git fork是git clone? ”。
You have to add the original repository (the one you forked) as a remote.
From the GitHub fork man page:
Once the clone is complete your repo will have a remote named “
origin
” that points to your fork on GitHub.
Don’t let the name confuse you, this does not point to the original repo you forked from. To help you keep track of that repo we will add another remote named “upstream”:$ cd github-services $ git remote add upstream git://github.com/pjhyett/github-services.git $ git fetch upstream # then: (like "git pull" which is fetch + merge) $ git merge upstream/master master # or, better, replay your local work on top of the fetched branch # like a "git pull --rebase" $ git rebase upstream/master
You have also a ruby gem which can facilitate those GitHub operations.
See also "Git fork is git clone?".
相关问答
更多-
如何更改我的存储库分叉的GitHub存储库?(How to change the GitHub repository from which my repository was forked?)[2021-11-27]
我建议两种选择之一: 删除您的回购并重新分出原来的回购。 联系Github研究员并向他们解释你的情况。 他们可能会帮助你。 我无法在Github设置中找到任何选项。 I'd suggest one of two options: Delete your repo and re-fork the original one. Contact Github fellows and explain your situation to them. They'll probably help you. I couldn ... -
您必须将原始存储库(您分配的存储库)添加为远程。 从GitHub fork手册页 : 克隆完成后,您的repo将有一个名为“ origin ”的远程指向您在GitHub上的分支。 不要让这个名字混淆你,这并不表示你从原来的回购。 为了帮助您跟踪该repo,我们将添加另一个名为“上游”的远程: $ cd github-services $ git remote add upstream git://github.com/pjhyett/github-services.git $ git fetch upstr ...
-
更新我的github回购,从另一个项目[复制](Update my github repo which is forked out from another project [duplicate])[2022-06-08]
在您当地的“克隆儿童”中,从父母拉出,如果您喜欢,将其添加为远程: cd child git remote add parentgit pull parent 父母的网址可能是公开的github repo,或者是您的本地克隆 - 本地克隆当然会更快。 如果你想拉一个分支,而不是父回调的当前HEAD,只需添加一个参数(例如git pull parent topic-branch )。 如果这是一次性,你可以跳过添加远程: git pull [branch ... -
用github forked存储库连接我的本地git存储库?(connect my local git repository with github forked repository?)[2021-11-08]
花了很长时间才弄清楚.. 在git中有一个cherry-pick命令,这对我的情况是完美的。 在GitHub上发送拉取请求仅用于最新提交 基本上, git checkout -b MyWork_for_pull_request upstream/master (make branch off upstream/master not origin/master) git cherry-pick `sha-of-MyWork-branch's-commit` (pick out commits I want t ... -
将远程github存储库中的更改合并到本地存储库(Merge changes from remote github repository to your local repository)[2022-06-15]
git remote add {name} {Public Clone URL} git pull {name} master git push 例: git remote add bret git://github.com/bret/watir.git git pull bret master git push git remote add {name} {Public Clone URL} git pull {name} master git push Example: git remote ad ... -
您可以联系github支持,并要求他们将您的存储库切换到“正常模式”。 在这个页面上 ,“提交是在一个叉子”段落,它被解释为必须通过支持切换。 因此,很可能没有办法自己做这件事(除非你破坏并重新创建了在之前解释过的回购),如果你这样做,小心,如果你有票或维基附件到您的项目,因为他们将被删除!)。 You can contact github support and ask them to switch your repository to "normal mode". On this page, "Comm ...
-
单击叉子数显示完整的网络。 从那里你可以点击“会员”,看看是谁分了回购。 ExpressJS示例: https : //github.com/visionmedia/express/network/members 。 Clicking the number of forks shows you the full network. From there you can click "members" to see who forked the repo. Example for ExpressJS: http ...
-
你会以这种方式失去所有的历史。 最好只更改遥控器的URL git remote set-url origin
现在旧的URL不再是存储库的一部分,所以不可能不小心推到那里。 You'll lose all your history that way. Better to just change the url for the remote git remote set-url origin 由于您的分支已被接受并合并到原始回购中,因此您不再需要它了。 您可以简单地通过拉动它来更新您的本地主人以反映原始回购主分店。 有关TortoiseGit指令,请参阅“ 我可以将git上的分叉项目更新为原始/主副本吗? ”。 TortoiseGit pull对话框将允许您选择要从中拉出的远程回购。 Since your branch has been accepted and merge into the original repo, you don't need it anymore. You can si ...您想要完成的是“对于repo-o上的每个远程分支,如果我没有它,则创建指向repo-o分支的相同分支,或者从repo上同一分支上的任何内容中获取本地分支上的信息o,最后将所有这些分支推送到我的repo-f“。 假设你的遥控器真的名为repo-o和repo-f ,我会玩bash : for repo_o_branch in \ $(git branch -a|grep repo-o|perl -nle's,^\s*repo\-o/,,;print $_'; do ( ...相关文章
更多- Hadoop的I/O
- Hadoop I/O系统介绍
- Lua 文件 I/O 操作
- Groovy 文件I/O 操作详解
- Hadoop1.0.4 HDFS I/O性能测试
- Java中如何用I/O流读取一个Word文档的内容?
- O2O
- WiFi入口流量O2O微应用平台
- redis安装-redis集群管理
- 阿虎烧烤的新感悟-O2O你真的会玩吗?
最新问答
更多- 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
- 如何通过引用返回对象?(How is returning an object by reference possible?)
- 矩阵如何存储在内存中?(How are matrices stored in memory?)
- 每个请求的Java新会话?(Java New Session For Each Request?)
- css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
- 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
- xcode语法颜色编码解释?(xcode syntax color coding explained?)
- 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
- 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
- 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
- 西安哪有PLC可控制编程的培训
- 在Entity Framework中选择基类(Select base class in Entity Framework)
- 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
- 电脑二级VF有什么用
- Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
- 金华英语角.
- 手机软件如何制作
- 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
- 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
- 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
- Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
- 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
- python的访问器方法有哪些
- DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
- 在Ruby中对组合进行排序(Sorting a combination in Ruby)
- 网站开发的流程?
- 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
- 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
- 透明度错误IE11(Transparency bug IE11)
- linux的基本操作命令。。。