SlideShare a Scribd company logo
1 of 11
Pemrograman berorientasi objek II
Ismael, S.Kom, M. Kom
 Thread merupakan sebuah pengontrol aliran program.
 Thread adalah suatu bagian program yang tidak tergantung pada
bagian lain dan dapat dijalankan secara bersama-sama
 Thread adalah subproses yang ringan, unit proses terkecil, sangat
independen
 Thread dapat diberhentikan atau diistirahatkan tanpa harus
menghentikan yang lainnya
 Thread dapat dianalogikan sebagai seorang pekerja dalam sebuah
pekerjaan (Kasir, Koki, programmer, dll)
 Kasir menerima pembayaran dari pembeli (melayani pembeli secara berurutan)
 Multi threading bisa dianalogikan dengan membuat beberapa orang pekerja sekaligus
untuk melakukan beberapa pekerjaan sekaligus secara paralel.
 Satu orang pekerja adalah satu thread, banyak pekerja adalah multi threading
 New
 Thread baru mulai siklus hidupnya, pada saat membuat instance kelas thread.
 Runnable
 setelah pemanggilan method start()
 Waiting
 Thread beralih dari status menunggu sementara dari thread lain melakukan tugasnya
 Time waiting
 Thread menunggu status berjangka waktu untuk interval waktu tertentu untuk di
jalankan kembali
 Terminate (Dead)
 Masa sebuah thread runnable memasuki status terminate
 Extend class Thread
 Implement interface runnable
atau
 thread pada java mempunyai prioritas dari 1 sampai 10. Prioritas tertinggi 10 dan
berakhir dengan 1 sebagai prioritas terendah. Sedangkan prioritas normal adalah 5

More Related Content

Recently uploaded

ppt-modul-6-pend-seni-di sd kelompok 2 ppt
ppt-modul-6-pend-seni-di sd kelompok 2 pptppt-modul-6-pend-seni-di sd kelompok 2 ppt
ppt-modul-6-pend-seni-di sd kelompok 2 pptArkhaRega1
 
Refleksi Mandiri Modul 1.3 - KANVAS BAGJA.pptx.pptx
Refleksi Mandiri Modul 1.3 - KANVAS BAGJA.pptx.pptxRefleksi Mandiri Modul 1.3 - KANVAS BAGJA.pptx.pptx
Refleksi Mandiri Modul 1.3 - KANVAS BAGJA.pptx.pptxIrfanAudah1
 
MODUL AJAR MATEMATIKA KELAS 6 KURIKULUM MERDEKA
MODUL AJAR MATEMATIKA KELAS 6 KURIKULUM MERDEKAMODUL AJAR MATEMATIKA KELAS 6 KURIKULUM MERDEKA
MODUL AJAR MATEMATIKA KELAS 6 KURIKULUM MERDEKAAndiCoc
 
Modul Ajar Bahasa Indonesia Kelas 4 Fase B
Modul Ajar Bahasa Indonesia Kelas 4 Fase BModul Ajar Bahasa Indonesia Kelas 4 Fase B
Modul Ajar Bahasa Indonesia Kelas 4 Fase BAbdiera
 
Kontribusi Islam Dalam Pengembangan Peradaban Dunia - KELOMPOK 1.pptx
Kontribusi Islam Dalam Pengembangan Peradaban Dunia - KELOMPOK 1.pptxKontribusi Islam Dalam Pengembangan Peradaban Dunia - KELOMPOK 1.pptx
Kontribusi Islam Dalam Pengembangan Peradaban Dunia - KELOMPOK 1.pptxssuser50800a
 
bab 6 ancaman terhadap negara dalam bingkai bhinneka tunggal ika
bab 6 ancaman terhadap negara dalam bingkai bhinneka tunggal ikabab 6 ancaman terhadap negara dalam bingkai bhinneka tunggal ika
bab 6 ancaman terhadap negara dalam bingkai bhinneka tunggal ikaAtiAnggiSupriyati
 
PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING...
PELAKSANAAN  + Link-Link MATERI Training_ "Effective INVENTORY &  WAREHOUSING...PELAKSANAAN  + Link-Link MATERI Training_ "Effective INVENTORY &  WAREHOUSING...
PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING...Kanaidi ken
 
PELAKSANAAN + Link2 Materi BimTek _PTK 007 Rev-5 Thn 2023 (PENGADAAN) & Perhi...
PELAKSANAAN + Link2 Materi BimTek _PTK 007 Rev-5 Thn 2023 (PENGADAAN) & Perhi...PELAKSANAAN + Link2 Materi BimTek _PTK 007 Rev-5 Thn 2023 (PENGADAAN) & Perhi...
PELAKSANAAN + Link2 Materi BimTek _PTK 007 Rev-5 Thn 2023 (PENGADAAN) & Perhi...Kanaidi ken
 
Prakarsa Perubahan ATAP (Awal - Tantangan - Aksi - Perubahan)
Prakarsa Perubahan ATAP (Awal - Tantangan - Aksi - Perubahan)Prakarsa Perubahan ATAP (Awal - Tantangan - Aksi - Perubahan)
Prakarsa Perubahan ATAP (Awal - Tantangan - Aksi - Perubahan)MustahalMustahal
 
RENCANA + Link2 Materi Pelatihan/BimTek "PTK 007 Rev-5 Thn 2023 (PENGADAAN) &...
RENCANA + Link2 Materi Pelatihan/BimTek "PTK 007 Rev-5 Thn 2023 (PENGADAAN) &...RENCANA + Link2 Materi Pelatihan/BimTek "PTK 007 Rev-5 Thn 2023 (PENGADAAN) &...
RENCANA + Link2 Materi Pelatihan/BimTek "PTK 007 Rev-5 Thn 2023 (PENGADAAN) &...Kanaidi ken
 
ppt-akhlak-tercela-foya-foya-riya-sumah-takabur-hasad asli.ppt
ppt-akhlak-tercela-foya-foya-riya-sumah-takabur-hasad asli.pptppt-akhlak-tercela-foya-foya-riya-sumah-takabur-hasad asli.ppt
ppt-akhlak-tercela-foya-foya-riya-sumah-takabur-hasad asli.pptAgusRahmat39
 
Keterampilan menyimak kelas bawah tugas UT
Keterampilan menyimak kelas bawah tugas UTKeterampilan menyimak kelas bawah tugas UT
Keterampilan menyimak kelas bawah tugas UTIndraAdm
 
PPT AKSI NYATA KOMUNITAS BELAJAR .ppt di SD
PPT AKSI NYATA KOMUNITAS BELAJAR .ppt di SDPPT AKSI NYATA KOMUNITAS BELAJAR .ppt di SD
PPT AKSI NYATA KOMUNITAS BELAJAR .ppt di SDNurainiNuraini25
 
PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING M...
PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING M...PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING M...
PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING M...Kanaidi ken
 
Bab 7 - Perilaku Ekonomi dan Kesejahteraan Sosial.pptx
Bab 7 - Perilaku Ekonomi dan Kesejahteraan Sosial.pptxBab 7 - Perilaku Ekonomi dan Kesejahteraan Sosial.pptx
Bab 7 - Perilaku Ekonomi dan Kesejahteraan Sosial.pptxssuser35630b
 
Salinan dari JUrnal Refleksi Mingguan modul 1.3.pdf
Salinan dari JUrnal Refleksi Mingguan modul 1.3.pdfSalinan dari JUrnal Refleksi Mingguan modul 1.3.pdf
Salinan dari JUrnal Refleksi Mingguan modul 1.3.pdfWidyastutyCoyy
 
Modul Ajar Pendidikan Pancasila Kelas 5 Fase C
Modul Ajar Pendidikan Pancasila Kelas 5 Fase CModul Ajar Pendidikan Pancasila Kelas 5 Fase C
Modul Ajar Pendidikan Pancasila Kelas 5 Fase CAbdiera
 
PPT PERUBAHAN LINGKUNGAN MATA PELAJARAN BIOLOGI KELAS X.pptx
PPT PERUBAHAN LINGKUNGAN MATA PELAJARAN BIOLOGI KELAS X.pptxPPT PERUBAHAN LINGKUNGAN MATA PELAJARAN BIOLOGI KELAS X.pptx
PPT PERUBAHAN LINGKUNGAN MATA PELAJARAN BIOLOGI KELAS X.pptxdpp11tya
 
Pendidikan-Bahasa-Indonesia-di-SD MODUL 3 .pptx
Pendidikan-Bahasa-Indonesia-di-SD MODUL 3 .pptxPendidikan-Bahasa-Indonesia-di-SD MODUL 3 .pptx
Pendidikan-Bahasa-Indonesia-di-SD MODUL 3 .pptxdeskaputriani1
 
Sesi 1_PPT Ruang Kolaborasi Modul 1.3 _ ke 1_PGP Angkatan 10.pptx
Sesi 1_PPT Ruang Kolaborasi Modul 1.3 _ ke 1_PGP Angkatan 10.pptxSesi 1_PPT Ruang Kolaborasi Modul 1.3 _ ke 1_PGP Angkatan 10.pptx
Sesi 1_PPT Ruang Kolaborasi Modul 1.3 _ ke 1_PGP Angkatan 10.pptxSovyOktavianti
 

Recently uploaded (20)

ppt-modul-6-pend-seni-di sd kelompok 2 ppt
ppt-modul-6-pend-seni-di sd kelompok 2 pptppt-modul-6-pend-seni-di sd kelompok 2 ppt
ppt-modul-6-pend-seni-di sd kelompok 2 ppt
 
Refleksi Mandiri Modul 1.3 - KANVAS BAGJA.pptx.pptx
Refleksi Mandiri Modul 1.3 - KANVAS BAGJA.pptx.pptxRefleksi Mandiri Modul 1.3 - KANVAS BAGJA.pptx.pptx
Refleksi Mandiri Modul 1.3 - KANVAS BAGJA.pptx.pptx
 
MODUL AJAR MATEMATIKA KELAS 6 KURIKULUM MERDEKA
MODUL AJAR MATEMATIKA KELAS 6 KURIKULUM MERDEKAMODUL AJAR MATEMATIKA KELAS 6 KURIKULUM MERDEKA
MODUL AJAR MATEMATIKA KELAS 6 KURIKULUM MERDEKA
 
Modul Ajar Bahasa Indonesia Kelas 4 Fase B
Modul Ajar Bahasa Indonesia Kelas 4 Fase BModul Ajar Bahasa Indonesia Kelas 4 Fase B
Modul Ajar Bahasa Indonesia Kelas 4 Fase B
 
Kontribusi Islam Dalam Pengembangan Peradaban Dunia - KELOMPOK 1.pptx
Kontribusi Islam Dalam Pengembangan Peradaban Dunia - KELOMPOK 1.pptxKontribusi Islam Dalam Pengembangan Peradaban Dunia - KELOMPOK 1.pptx
Kontribusi Islam Dalam Pengembangan Peradaban Dunia - KELOMPOK 1.pptx
 
bab 6 ancaman terhadap negara dalam bingkai bhinneka tunggal ika
bab 6 ancaman terhadap negara dalam bingkai bhinneka tunggal ikabab 6 ancaman terhadap negara dalam bingkai bhinneka tunggal ika
bab 6 ancaman terhadap negara dalam bingkai bhinneka tunggal ika
 
PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING...
PELAKSANAAN  + Link-Link MATERI Training_ "Effective INVENTORY &  WAREHOUSING...PELAKSANAAN  + Link-Link MATERI Training_ "Effective INVENTORY &  WAREHOUSING...
PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING...
 
PELAKSANAAN + Link2 Materi BimTek _PTK 007 Rev-5 Thn 2023 (PENGADAAN) & Perhi...
PELAKSANAAN + Link2 Materi BimTek _PTK 007 Rev-5 Thn 2023 (PENGADAAN) & Perhi...PELAKSANAAN + Link2 Materi BimTek _PTK 007 Rev-5 Thn 2023 (PENGADAAN) & Perhi...
PELAKSANAAN + Link2 Materi BimTek _PTK 007 Rev-5 Thn 2023 (PENGADAAN) & Perhi...
 
Prakarsa Perubahan ATAP (Awal - Tantangan - Aksi - Perubahan)
Prakarsa Perubahan ATAP (Awal - Tantangan - Aksi - Perubahan)Prakarsa Perubahan ATAP (Awal - Tantangan - Aksi - Perubahan)
Prakarsa Perubahan ATAP (Awal - Tantangan - Aksi - Perubahan)
 
RENCANA + Link2 Materi Pelatihan/BimTek "PTK 007 Rev-5 Thn 2023 (PENGADAAN) &...
RENCANA + Link2 Materi Pelatihan/BimTek "PTK 007 Rev-5 Thn 2023 (PENGADAAN) &...RENCANA + Link2 Materi Pelatihan/BimTek "PTK 007 Rev-5 Thn 2023 (PENGADAAN) &...
RENCANA + Link2 Materi Pelatihan/BimTek "PTK 007 Rev-5 Thn 2023 (PENGADAAN) &...
 
ppt-akhlak-tercela-foya-foya-riya-sumah-takabur-hasad asli.ppt
ppt-akhlak-tercela-foya-foya-riya-sumah-takabur-hasad asli.pptppt-akhlak-tercela-foya-foya-riya-sumah-takabur-hasad asli.ppt
ppt-akhlak-tercela-foya-foya-riya-sumah-takabur-hasad asli.ppt
 
Keterampilan menyimak kelas bawah tugas UT
Keterampilan menyimak kelas bawah tugas UTKeterampilan menyimak kelas bawah tugas UT
Keterampilan menyimak kelas bawah tugas UT
 
PPT AKSI NYATA KOMUNITAS BELAJAR .ppt di SD
PPT AKSI NYATA KOMUNITAS BELAJAR .ppt di SDPPT AKSI NYATA KOMUNITAS BELAJAR .ppt di SD
PPT AKSI NYATA KOMUNITAS BELAJAR .ppt di SD
 
PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING M...
PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING M...PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING M...
PELAKSANAAN + Link-Link MATERI Training_ "Effective INVENTORY & WAREHOUSING M...
 
Bab 7 - Perilaku Ekonomi dan Kesejahteraan Sosial.pptx
Bab 7 - Perilaku Ekonomi dan Kesejahteraan Sosial.pptxBab 7 - Perilaku Ekonomi dan Kesejahteraan Sosial.pptx
Bab 7 - Perilaku Ekonomi dan Kesejahteraan Sosial.pptx
 
Salinan dari JUrnal Refleksi Mingguan modul 1.3.pdf
Salinan dari JUrnal Refleksi Mingguan modul 1.3.pdfSalinan dari JUrnal Refleksi Mingguan modul 1.3.pdf
Salinan dari JUrnal Refleksi Mingguan modul 1.3.pdf
 
Modul Ajar Pendidikan Pancasila Kelas 5 Fase C
Modul Ajar Pendidikan Pancasila Kelas 5 Fase CModul Ajar Pendidikan Pancasila Kelas 5 Fase C
Modul Ajar Pendidikan Pancasila Kelas 5 Fase C
 
PPT PERUBAHAN LINGKUNGAN MATA PELAJARAN BIOLOGI KELAS X.pptx
PPT PERUBAHAN LINGKUNGAN MATA PELAJARAN BIOLOGI KELAS X.pptxPPT PERUBAHAN LINGKUNGAN MATA PELAJARAN BIOLOGI KELAS X.pptx
PPT PERUBAHAN LINGKUNGAN MATA PELAJARAN BIOLOGI KELAS X.pptx
 
Pendidikan-Bahasa-Indonesia-di-SD MODUL 3 .pptx
Pendidikan-Bahasa-Indonesia-di-SD MODUL 3 .pptxPendidikan-Bahasa-Indonesia-di-SD MODUL 3 .pptx
Pendidikan-Bahasa-Indonesia-di-SD MODUL 3 .pptx
 
Sesi 1_PPT Ruang Kolaborasi Modul 1.3 _ ke 1_PGP Angkatan 10.pptx
Sesi 1_PPT Ruang Kolaborasi Modul 1.3 _ ke 1_PGP Angkatan 10.pptxSesi 1_PPT Ruang Kolaborasi Modul 1.3 _ ke 1_PGP Angkatan 10.pptx
Sesi 1_PPT Ruang Kolaborasi Modul 1.3 _ ke 1_PGP Angkatan 10.pptx
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Pertemuan 1 (Thread Teori) Pemograman Berorientasi objek.pptx

  • 1. Pemrograman berorientasi objek II Ismael, S.Kom, M. Kom
  • 2.  Thread merupakan sebuah pengontrol aliran program.  Thread adalah suatu bagian program yang tidak tergantung pada bagian lain dan dapat dijalankan secara bersama-sama  Thread adalah subproses yang ringan, unit proses terkecil, sangat independen  Thread dapat diberhentikan atau diistirahatkan tanpa harus menghentikan yang lainnya  Thread dapat dianalogikan sebagai seorang pekerja dalam sebuah pekerjaan (Kasir, Koki, programmer, dll)  Kasir menerima pembayaran dari pembeli (melayani pembeli secara berurutan)
  • 3.  Multi threading bisa dianalogikan dengan membuat beberapa orang pekerja sekaligus untuk melakukan beberapa pekerjaan sekaligus secara paralel.  Satu orang pekerja adalah satu thread, banyak pekerja adalah multi threading
  • 4.  New  Thread baru mulai siklus hidupnya, pada saat membuat instance kelas thread.  Runnable  setelah pemanggilan method start()  Waiting  Thread beralih dari status menunggu sementara dari thread lain melakukan tugasnya  Time waiting  Thread menunggu status berjangka waktu untuk interval waktu tertentu untuk di jalankan kembali  Terminate (Dead)  Masa sebuah thread runnable memasuki status terminate
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.  Extend class Thread  Implement interface runnable atau
  • 11.  thread pada java mempunyai prioritas dari 1 sampai 10. Prioritas tertinggi 10 dan berakhir dengan 1 sebagai prioritas terendah. Sedangkan prioritas normal adalah 5