多线程进程和单线程进程 [英] multithreaded process and single-threaded process

查看:154
本文介绍了多线程进程和单线程进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果派生了多线程进程,则在子级获得所有父级线程的副本时会出现问题.假设原始线程之一正在等待键盘输入.现在有两个线程在等待键盘输入,每个进程一个.在单线程进程中是否会发生此问题? :)

If a multithreaded process forks, a problem occurs if the child gets copies of all the parent''s threads. Suppose that one of the original threads was waiting for keyboard input. Now two threads are waiting for keyboard input, one in each process. Does this problem ever occur in single-threaded processes? :)

推荐答案

写道:​​

单线程是否会出现此问题?流程?

Does this problem ever occur in single-threaded processes?



怎么可能一个单线程进程只有一个线程.



How could it; a single-threaded process has only one thread.


这篇关于多线程进程和单线程进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆