freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

中等規(guī)模的并發(fā)程序設(shè)計(jì)(存儲(chǔ)版)

  

【正文】 ool(int nThreads){…} ExecutorService newCachedThreadPool() {…} // … many more… } Future (一 ) ? 一種很常用并發(fā)程序設(shè)計(jì)的手段便是任務(wù)分解。 void set(V v) 。 E poll(long timeout, TimeUnit unit) throws InterruptedException。 – Java內(nèi)置的兩個(gè)定時(shí)器實(shí)現(xiàn) Timer和ScheduledThreadPoolExecutor都不能滿足大規(guī)模定時(shí)器的性能需求。 boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException。 boolean replace(K key, V oldValue, V newValue) 。在 Mustang( Java )中,基于鎖的 SynchronousQueue 算法被新的非阻塞版本代替。 void lockInterruptibly() throws InterruptedException。 } – class DelayQueueE extends Delayed implements BlockingQueueE { private final PriorityQueueE q。 E peek()。 V get()。 } ? ExecutorService生命周期管理,提供了 Future返回和其他工具方法 – interface ExecutorService extends Executor { void shutdown()。(經(jīng)常需要發(fā)明類(lèi)似BlockingQueue、 ReadWriteLock之類(lèi)的輪子) ? 并發(fā)程序設(shè)計(jì)簡(jiǎn)單化 ? 提供基本的并發(fā)類(lèi) – 包括 Lock、 Condition、 Semaphore、 Atomic等 ? 提供線程安全的數(shù)據(jù)結(jié)構(gòu) – ConcurrentLinkedQueue、 ConcurrentHashMap ? 提供了一些常用的工具類(lèi) – Thread pool、 Scheduler、 barrier、 latch、 blocking queue等 ? 提供 Atomic – 為專(zhuān)家提供用于開(kāi)發(fā)高級(jí)的 lockfree算法 拜神 Doug Lea Doug Lea Mr. concurrency ,當(dāng)今世界上并發(fā)程序設(shè)計(jì)領(lǐng)域的先驅(qū),著名學(xué)者。 –條件變量都提供三個(gè)原子操作 wait、 signal、broadcast。 – Win32和 OS/2 Threads ? Win32 Threads提供大量線程通訊 API,功能強(qiáng)大。 Phtread在 linux下有兩種實(shí)現(xiàn), linux NPTL。 ? Monitor – 中文翻譯為管程。( CPU的緩存) – 線程太多,會(huì)導(dǎo)致頻繁的上下文切換,導(dǎo)致過(guò)多無(wú)謂的開(kāi)銷(xiāo)。其” A Scalable Eliminationbased Exchange Channel”和” Scalable Synchronous Queues”兩篇論文列為非阻塞同步算法的經(jīng)典文章 Executors (一) ? 這是一種任務(wù)分解。 Task Provider分解任務(wù),提交給Executor執(zhí)行。 void setException(Throwable t)。 int drainTo(Collection? super E c)。 Ti
點(diǎn)擊復(fù)制文檔內(nèi)容
規(guī)章制度相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1