Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Java Multi Thread vs Go Multi Thread

 
Ranch Hand
Posts: 811
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will multi threading in GO is better than Java?
 
author
Posts: 37
VI Editor Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ninad,

Yes, concurrency in Go is better than in Java or C++.

This is because Go uses extremely lightweight "threads" called goroutines. On many desktop computers even creating 10s or 100s of threads causes problems, using Go to create 100s, 1000s, or 10000s of goroutines is no problem at all. Also Go's approach to concurrency is much higher level than Java or C++'s approaches: this makes concurrency in Go easier to program and reason about.
 
Ninad Kulkarni
Ranch Hand
Posts: 811
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark,
GO seems to be interesting.
 
Mark Summerfield
author
Posts: 37
VI Editor Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ninad,

Yes, I think that Go is the most interesting new language I've seen since Java appeared in the mid 1990s!
 
Ranch Hand
Posts: 125
1
Clojure Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark Summerfield,

I've read a lot of good things about go's goroutines. However, Java now has something similar (which may have been inspired by goroutines, I don't know) from the Akka library: http://akka.io/

For certain classes of multi-threaded programming in Java, thanks to Akka you no longer need to manage threads and synchronization yourself.

 
Mark Summerfield
author
Posts: 37
VI Editor Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael,

As I mentioned in another post there's no doubt that C++ and Java will get CSP libraries---but this isn't the same as having the facility built-in.
 
I'm not dead! I feel happy! I'd like to go for a walk! I'll even read a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!