Skip to content
New issue

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

Why not hook "sleep" and "usleep"? #11

Open
zy498420 opened this issue Dec 4, 2016 · 1 comment
Open

Why not hook "sleep" and "usleep"? #11

zy498420 opened this issue Dec 4, 2016 · 1 comment

Comments

@zy498420
Copy link

zy498420 commented Dec 4, 2016

As poll has been hooked, they can be easily implemented.

After hooked them, we can simply write period "consumer" program (offline scanner).

因为poll已经被挂钩,所以sleep和usleep可以轻松的用poll来实现协程式的休眠。
如果 sleep和usleep被挂钩,我们可以轻松的实现周期性工作的消费者程序(在离线扫描程序中很常见)。

@hcconquer
Copy link

hcconquer commented Dec 8, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants