Java在运行代码时是否使用多个进程?

huangapple 未分类评论45阅读模式
英文:

Does java uses more than one process to run the code

问题

Sure, here's the translated content:

Java中的多线程是如何工作的?如果我创建了一堆线程,JVM会如何将这些线程分配给进程?如果线程在进程之间创建,那么上下文切换会很昂贵吗?

英文:

how does the multi-threading in java works? if I create a bunch of threads how JVM allocates those threads across the processes. and if threads are created across the processes will the context switching be costly?

huangapple
  • 本文由 发表于 2020年4月8日 19:49:54
  • 转载请务必保留本文链接:https://java.coder-hub.com/61099978.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定