Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. CO10,000 would be pretty nice. But I thought that such a huch amount of threads would mean tons of context switches which in turn decrease the performance massively. This gets even worse when the threads need to communicate. Lightweight threads are nice because there is no context switch which would involve kernel lock etc. Practically its pretty simple if Java would let me access the stack programmatically. I like the concept of cheap native OS threads but I don't think this is possible. EDIT: The lightweight threads could then be managed using async IO.
      singulars
    2. COJava threads aren't necessarily kernel threads. The JVM is free to implement the threading however it wants, and thread pooling is common. Modifying the live call stack is basically the same thing as rewriting the VM, and there's no way to do that from within Java itself. A VM agent could do so, but you're much better off using the debugged and tuned threads implementation you already have available.
      singulars
    3. COI'm not aware of a JVM which does not use kernel threads beside one of the first JVMs (1.1). But they changed quite fast to kernel threads. The possibility that at some time JVM implementations will support lightweight threads is therefore quite unlikely. For network applications green threads are the way you go. Unfortunately only a few languages does really support green threads like Haskell, Go and C# (C# kinda fakes them, not as beautiful as Haskell or Go), Python using Gevent. Well I guess I have to go with a billion lines of callback spaghetti code =(
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload