Open main menu

CDOT Wiki β

Changes

GPU621/Go Kimchi

53 bytes removed, 03:31, 4 August 2021
Parallel Programming in GO & Java
'''Implementation'''
Go language focuses on concurrency and parallelism by implementing its own Goroutine instead of regular threading. Goroutines uses the built-in scheduler to conduct the threads in behind and hide many complexity of thread management from the user to specify which function to run and execute them with “Go” command.
Java language can implement thread in two three different methods. The first method is to create a class which extends the “Thread” "Thread" class that gives the user to have control of the lifecycle of the thread. But Java language only allows single inheritance which prevents the thread from being extend extending other base class. The second method is using ‘Runnable’ "Runnable" interface. This method allows to user to extend other base class while still being run as a new thread. However, this method does not give user to control lifecycle of thread. The third, Java version 5.0 and later provides "concurrency " to simplify thread creation and processing. The "[https://docs.oracle.com/javase/tutorial/essential/concurrency/executors.html Executor]" that implement by java.util.concurrent provides APIs for creating and processing new threads using reusable threads.
===General Implementation Info===
58
edits