အခန်း(၅) ThreadPoolExecutor နဲ့ တွဲသုံးတဲ့ Datastructure များ(Data Structures in Action)

ThreadPoolExecutor သုံးတဲ့ Queue က Blocking Queue အမျိုးအစားဝင်တွေထဲက ဖြစ်ပါတယ်။ ExecutorService pool = Executors.newFixedThreadPool(10); ဒါက သူ့ default constructor ကိုခေါ်ထားတာ။ return new ThreadPoolExecutor( nThreads, nThreads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>() ); ThreadPoolExecutors ဆိုတာက utility Continue reading အခန်း(၅) ThreadPoolExecutor နဲ့ တွဲသုံးတဲ့ Datastructure များ(Data Structures in Action)

အပိုင်း(၄)- HashMap ထဲက Node များအကြောင်း (Data Structures in Action)

Node<K,V>[] table;//internal array of hashmap HashMap ရဲ့ အထဲမှာ Node တွေကို သိမ်းတဲ့ table array ရှိပါတယ်။ ယခင် bix ming က h ကို အောက်ပါအတိုင်း လုပ်ရင် array ရဲ့ index ကို ရတာပါ။ index ညွုန်ထားတဲ့ အခန်းကို Continue reading အပိုင်း(၄)- HashMap ထဲက Node များအကြောင်း (Data Structures in Action)