Virtual thread: Difference between revisions

Content deleted Content added
Commenting on submission (AFCH 0.9.1)
Line 1:
{{AFC submission|||u=Haraldrudell|ns=118|ts=20220405190923}} <!-- Do not remove this line! -->
{{Short description|The definitions explain how virtual threads are different. They are a need due to multi-core CPUs}}
{{Draft topics|internet-culture|software|computing|technology}}
{{AfC topic|stem}}
{{AfC submission|||ts=20220405190923|u=Haraldrudell|ns=118}}
{{AFC submission|d|exists|Green threads|u=Haraldrudell|ns=118|decliner=Robert McClenon|declinets=20220405062331|ts=20220405015607}} <!-- Do not remove this line! -->
 
{{AFC comment|1=See also [[Wikipedia:Redirects_for_discussion/Log/2022_April_6#Virtual_threads]]. This draft can be considered for acceptance after the redirect is deleted. [[User:Robert McClenon|Robert McClenon]] ([[User talk:Robert McClenon|talk]]) 18:59, 6 April 2022 (UTC)}}
 
{{AFC comment|1=You may edit the existing article to add any material that is not already present. If this is a request to rename, please discuss via a [[WP:MR|Move Request]], [[User:Robert McClenon|Robert McClenon]] ([[User talk:Robert McClenon|talk]]) 06:23, 5 April 2022 (UTC)}}
Line 9 ⟶ 8:
----
 
{{Short description|The definitions explain how virtual threads are different. They are a need due to multi-core CPUs}}
{{Draft topics|internet-culture|software|computing|technology}}
{{AfC topic|stem}}
 
In [[computer programming]], '''virtual threads''' are [[Thread (computing)|threads]] that are scheduled by a [[runtime library]] instead of natively by the underlying [[operating system]] (OS). Virtual threads allows for tens of millions of preemptive tasks and events without swapping on a 2021 consumer-grade computer..<ref name="javaworld2">{{cite web |last1=Rudell |first1=Harald |date=2022-03-19 |title=massivevirtualparallelism |url=https://codeberg.org/haraldrudell/massivevirtualparallelism/src/branch/main/README.md |website= |quote= |df= |accessdate=}}</ref>, compared to low thousands of operating system threads<ref>{{Cite web |last=baeldung |date=2022-01-02 |title=Maximum Number of Threads Per Process in Linux {{!}} Baeldung on Linux |url=https://www.baeldung.com/linux/max-threads-per-process |access-date=2022-03-30 |website=www.baeldung.com |language=en-US}}</ref>. Preemptive execution<ref>{{Cite web |title=Go 1.14 Release Notes - The Go Programming Language |url=https://go.dev/doc/go1.14#runtime |access-date=2022-03-30 |website=go.dev}}</ref> is important to performance gains through parallelism and fast preemptive response times for tens of millions of events. Earlier constructs that are not preemptive, such as [[Coroutine|coroutines]] or the largely single-threaded [[Node.js]], introduce delays in responding to asynchronous events such as every incoming request in a server application<ref>{{Cite web |last=Node.js |title=Don't Block the Event Loop (or the Worker Pool) |url=https://nodejs.org/en/docs/guides/dont-block-the-event-loop/ |access-date=2022-03-30 |website=Node.js |language=en}}</ref>.
 
In [[computer programming]], '''virtual threads''' are [[Thread (computing)|threads]] that are scheduled by a [[runtime library]] instead of natively by the underlying [[operating system]] (OS). Virtual threads allows for tens of millions of preemptive tasks and events without swapping on a 2021 consumer-grade computer.<ref name="javaworld2">{{cite web |last1=Rudell |first1=Harald |date=2022-03-19 |title=massivevirtualparallelism |url=https://codeberg.org/haraldrudell/massivevirtualparallelism/src/branch/main/README.md |website= |quote= |df= |accessdate=}}</ref>, compared to low thousands of operating system threads<ref>{{Cite web |last=baeldung |date=2022-01-02 |title=Maximum Number of Threads Per Process in Linux {{!}} Baeldung on Linux |url=https://www.baeldung.com/linux/max-threads-per-process |access-date=2022-03-30 |website=www.baeldung.com |language=en-US}}</ref>. Preemptive execution<ref>{{Cite web |title=Go 1.14 Release Notes - The Go Programming Language |url=https://go.dev/doc/go1.14#runtime |access-date=2022-03-30 |website=go.dev}}</ref> is important to performance gains through parallelism and fast preemptive response times for tens of millions of events. Earlier constructs that are not preemptive, such as [[Coroutine|coroutines]] or the largely single-threaded [[Node.js]], introduce delays in responding to asynchronous events such as every incoming request in a server application<ref>{{Cite web |last=Node.js |title=Don't Block the Event Loop (or the Worker Pool) |url=https://nodejs.org/en/docs/guides/dont-block-the-event-loop/ |access-date=2022-03-30 |website=Node.js |language=en}}</ref>.
 
== Definition ==