• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do we make a green thread

 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,

How do we implement a green thread , is it like any other user thread in java , or is there any thing special to it .

Can i make a user thread , a green as we can make deamon thread from user thread or vice versa

If possible give one small working example

Regards
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't "make a green thread", nor can some threads in an application be "green", while other aren't. A Java Virtual Machine needs to be built on top of some "real" thread library -- i.e., a thread library in native code. The earliest JVMs used a library called "Green threads", which was relatively crude, but also relatively portable, and it was a good way for Sun to get a JVM working on a number of platforms early on. As time has passed, and operating systems have matured, Sun's JVMs (and those from other vendors) have more or less universally transitioned to using the OS's standard or built-in thread implementation. At first, these "native thread" JVMs had some problems, mostly due to the immaturity of the underlying libraries, but things have improved greatly over the years. Thankfully, Sun is no longer shipping JVMs that use Green threads. This is a Good Thing.
 
faisal usmani
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx ,

I got the point .


regards
 
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Learn something new every day.
 
I can't take it! You are too smart for me! Here is the tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic