多线程进程和单线程进程

编程入门 行业动态 更新时间:2024-10-15 16:20:11
本文介绍了多线程进程和单线程进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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.

更多推荐

多线程进程和单线程进程

本文发布于:2023-06-01 18:25:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/422863.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:进程   多线程   单线程

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!