Difference between revisions of "Threads and Executors"

From CSE231 Wiki
Jump to navigation Jump to search
m (Cosgroved moved page Futures and Executors to Threads and Executors)
Line 2: Line 2:
 
==SimpleThreadFactory==
 
==SimpleThreadFactory==
 
implement <code>Thread newThread(Runnable target)</code>
 
implement <code>Thread newThread(Runnable target)</code>
 +
 +
just create and return a [https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#Thread-java.lang.Runnable- new thread with the Runnable parameter] you are passed.  Do NOT start this thread.  Certainly, do NOT run this thread.  Do not pass go.  Do not collect $200.
  
 
==TAgeSum==
 
==TAgeSum==

Revision as of 21:32, 24 September 2017

Threads

SimpleThreadFactory

implement Thread newThread(Runnable target)

just create and return a new thread with the Runnable parameter you are passed. Do NOT start this thread. Certainly, do NOT run this thread. Do not pass go. Do not collect $200.

TAgeSum

implement int sumUpperLowerSplit(int[] ages, ThreadFactory threadFactory)

Executors

XNucleobaseCount

XQuicksort