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

有个疑问 #9

Open
wwhai opened this issue Oct 19, 2022 · 2 comments
Open

有个疑问 #9

wwhai opened this issue Oct 19, 2022 · 2 comments

Comments

@wwhai
Copy link

wwhai commented Oct 19, 2022

例如下面这种阻塞代码怎么调度呢?

f1(){
        sleep(99999999)
}
f2(){
        println("hello")
}

main(){
        f1()
        f2()
}
@wangbojing
Copy link
Owner

顺序执行,sleep超时以后 main才能往后面执行。

@wwhai
Copy link
Author

wwhai commented Oct 19, 2022

顺序执行,sleep超时以后 main才能往后面执行。


搜嘎 明白了,相当于是公平调度器,其中任何一个任务都不能卡死 否则就把主线程挂起来。是否可以加入调度支持呢?比如当识别到某个代码挂起来了 就转移队列

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