Also, a green thread may block all other threads if performing a blocking I/O operation. To avoid that problem, green threads must use asynchronous I/O operations, and that added complexity does increase latency, as well as development time and difficulty.
Being created at the user space level, green threads are lighter than native threads, but as they implement a form of cooperative multitasking, bugs in threaded programs can bring the system to a halt.
An exception to this is the Squawk virtual machine, which is a mixture between an operating system for low-power devices and a Java virtual machine. It uses green threads in order to keep the native code to an absolute minimum and to support the migration of its isolates.
The Erlang virtual machine has what might be called 'green processes' - they are like operating system processes (they do not share state like threads do) but are implemented within the Erlang Run Time System (erts). These are sometimes (erroneously) cited as 'green threads'.
In the case of GHC Haskell, a context switch occurs at the first allocation after a configurable timeout. GHC threads are also potentially run on one or more OS threads during their lifetime (there is a many-to-many relationship between GHC threads and OS threads), allowing for parallelism on symmetric multiprocessing machines, while not creating more costly OS threads than is necessary to run on the available number of cores.
The Smalltalk virtual machines do not count evaluation steps; however, the VM can still preempt the executing thread on external signals (such as expiring timers, or I/O becoming available). Certain Smalltalk implementations, e.g. QKS Smalltalk, do count evaluation steps, support green threads and prevent priority inversion. In most Smalltalk environments, a high-priority process that wakes up regularly will effectively implement time-sharing preemption:
[(Delay forMilliseconds: 50) wait] repeat
] forkAt: Processor highIOPriority
Most green thread implementations do not have any support for preventing priority inversion.