SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Último

Modul Ajar Ipa kelas 8 Struktur Bumi dan perkembangannya
Modul Ajar Ipa kelas 8 Struktur Bumi dan perkembangannyaModul Ajar Ipa kelas 8 Struktur Bumi dan perkembangannya
Modul Ajar Ipa kelas 8 Struktur Bumi dan perkembangannya
Novi Cherly
 
Soal BAB 6 IPAS KELAS 4.doc tentang kebudayaan
Soal BAB 6 IPAS KELAS 4.doc tentang kebudayaanSoal BAB 6 IPAS KELAS 4.doc tentang kebudayaan
Soal BAB 6 IPAS KELAS 4.doc tentang kebudayaan
ressyefrina15
 
Laporan Guru Piket Bukti Dukung PMM - www.kherysuryawan.id (1) (1).pdf
Laporan Guru Piket Bukti Dukung PMM - www.kherysuryawan.id (1) (1).pdfLaporan Guru Piket Bukti Dukung PMM - www.kherysuryawan.id (1) (1).pdf
Laporan Guru Piket Bukti Dukung PMM - www.kherysuryawan.id (1) (1).pdf
SriHandayaniLubisSpd
 
Lokakarya Kepemimpinan Sekolah 1_Mei 2024.pptx
Lokakarya Kepemimpinan Sekolah 1_Mei 2024.pptxLokakarya Kepemimpinan Sekolah 1_Mei 2024.pptx
Lokakarya Kepemimpinan Sekolah 1_Mei 2024.pptx
Hermawati Dwi Susari
 
Presentasi-ruang-kolaborasi-modul-1.4.doc
Presentasi-ruang-kolaborasi-modul-1.4.docPresentasi-ruang-kolaborasi-modul-1.4.doc
Presentasi-ruang-kolaborasi-modul-1.4.doc
LeoRahmanBoyanese
 

Último (20)

Materi Penggolongan Obat Undang-Undang Kesehatan
Materi Penggolongan Obat Undang-Undang KesehatanMateri Penggolongan Obat Undang-Undang Kesehatan
Materi Penggolongan Obat Undang-Undang Kesehatan
 
PELAKSANAAN + Link2 MATERI Training_ "AUDIT INTERNAL + SISTEM MANAJEMEN MUTU ...
PELAKSANAAN + Link2 MATERI Training_ "AUDIT INTERNAL + SISTEM MANAJEMEN MUTU ...PELAKSANAAN + Link2 MATERI Training_ "AUDIT INTERNAL + SISTEM MANAJEMEN MUTU ...
PELAKSANAAN + Link2 MATERI Training_ "AUDIT INTERNAL + SISTEM MANAJEMEN MUTU ...
 
MODUL AJAR SENI MUSIK KELAS 4 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI MUSIK KELAS 4 KURIKULUM MERDEKA.pdfMODUL AJAR SENI MUSIK KELAS 4 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI MUSIK KELAS 4 KURIKULUM MERDEKA.pdf
 
MODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdfMODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI MUSIK KELAS 5 KURIKULUM MERDEKA.pdf
 
Lokakarya Kepemimpinan Sekolah Penggerak 1.pptx
Lokakarya Kepemimpinan Sekolah Penggerak 1.pptxLokakarya Kepemimpinan Sekolah Penggerak 1.pptx
Lokakarya Kepemimpinan Sekolah Penggerak 1.pptx
 
Slide Kick Off for Public - Google Cloud Arcade Facilitator 2024.pptx
Slide Kick Off for Public - Google Cloud Arcade Facilitator 2024.pptxSlide Kick Off for Public - Google Cloud Arcade Facilitator 2024.pptx
Slide Kick Off for Public - Google Cloud Arcade Facilitator 2024.pptx
 
AKSI NYATA fASILITATOR pEMBELAJARAN (.pptx
AKSI NYATA fASILITATOR pEMBELAJARAN (.pptxAKSI NYATA fASILITATOR pEMBELAJARAN (.pptx
AKSI NYATA fASILITATOR pEMBELAJARAN (.pptx
 
MODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdfMODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdf
MODUL AJAR SENI RUPA KELAS 2 KURIKULUM MERDEKA.pdf
 
Modul Ajar Ipa kelas 8 Struktur Bumi dan perkembangannya
Modul Ajar Ipa kelas 8 Struktur Bumi dan perkembangannyaModul Ajar Ipa kelas 8 Struktur Bumi dan perkembangannya
Modul Ajar Ipa kelas 8 Struktur Bumi dan perkembangannya
 
Soal BAB 6 IPAS KELAS 4.doc tentang kebudayaan
Soal BAB 6 IPAS KELAS 4.doc tentang kebudayaanSoal BAB 6 IPAS KELAS 4.doc tentang kebudayaan
Soal BAB 6 IPAS KELAS 4.doc tentang kebudayaan
 
Modul Ajar Sosiologi - Lembaga Sosial - Fase E.pdf
Modul Ajar Sosiologi - Lembaga Sosial - Fase E.pdfModul Ajar Sosiologi - Lembaga Sosial - Fase E.pdf
Modul Ajar Sosiologi - Lembaga Sosial - Fase E.pdf
 
#05 SOSIALISASI JUKNIS BOK 2024 Canva_124438.pptx
#05 SOSIALISASI JUKNIS BOK 2024 Canva_124438.pptx#05 SOSIALISASI JUKNIS BOK 2024 Canva_124438.pptx
#05 SOSIALISASI JUKNIS BOK 2024 Canva_124438.pptx
 
MODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdf
MODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdfMODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdf
MODUL AJAR MATEMATIKA KELAS 4 KURIKULUM MERDEKA.pdf
 
Laporan Guru Piket Bukti Dukung PMM - www.kherysuryawan.id (1) (1).pdf
Laporan Guru Piket Bukti Dukung PMM - www.kherysuryawan.id (1) (1).pdfLaporan Guru Piket Bukti Dukung PMM - www.kherysuryawan.id (1) (1).pdf
Laporan Guru Piket Bukti Dukung PMM - www.kherysuryawan.id (1) (1).pdf
 
MODUL AJAR BAHASA INGGRIS KELAS 4 KURIKULUM MERDEKA.pdf
MODUL AJAR BAHASA INGGRIS KELAS 4 KURIKULUM MERDEKA.pdfMODUL AJAR BAHASA INGGRIS KELAS 4 KURIKULUM MERDEKA.pdf
MODUL AJAR BAHASA INGGRIS KELAS 4 KURIKULUM MERDEKA.pdf
 
LAPORAN SATUAN PENDIDIKAN 211 sabadolok.docx
LAPORAN SATUAN PENDIDIKAN 211 sabadolok.docxLAPORAN SATUAN PENDIDIKAN 211 sabadolok.docx
LAPORAN SATUAN PENDIDIKAN 211 sabadolok.docx
 
AKUNTANSI INVESTASI PD SEKURITAS UTANG.pptx
AKUNTANSI INVESTASI PD SEKURITAS UTANG.pptxAKUNTANSI INVESTASI PD SEKURITAS UTANG.pptx
AKUNTANSI INVESTASI PD SEKURITAS UTANG.pptx
 
Lokakarya Kepemimpinan Sekolah 1_Mei 2024.pptx
Lokakarya Kepemimpinan Sekolah 1_Mei 2024.pptxLokakarya Kepemimpinan Sekolah 1_Mei 2024.pptx
Lokakarya Kepemimpinan Sekolah 1_Mei 2024.pptx
 
Presentasi-ruang-kolaborasi-modul-1.4.doc
Presentasi-ruang-kolaborasi-modul-1.4.docPresentasi-ruang-kolaborasi-modul-1.4.doc
Presentasi-ruang-kolaborasi-modul-1.4.doc
 
Tugas Mandiri 1.4.a.4.4.pdf Ninik Widarsih
Tugas Mandiri 1.4.a.4.4.pdf Ninik WidarsihTugas Mandiri 1.4.a.4.4.pdf Ninik Widarsih
Tugas Mandiri 1.4.a.4.4.pdf Ninik Widarsih
 

Destacado

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
ThinkNow
 
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
Kurio // The Social Media Age(ncy)
 

Destacado (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