Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
Java Tutorial
Thread 72 codes
Home
Java Tutorial
Thread
1 A daemon thread
2 A live daemon thread does not prevent an application from exiting
3 A pool of work threads
4 A queue(LinkedList) is used to coordinate work between a producer and a set of worker threads
5 A semaphore based coordination
6 A synchronized collection with Collections synchronizedCollection
7 A thread must be marked as a daemon thread before it is started
8 Add a delay
9 Add thread to thread group
10 An application exits when there are no non-daemon threads running
11 An example of deadlock
12 Animation with ScheduledThreadPoolExecutor
13 Change Thread Priority
14 Communicate between threads using a Queue
15 Controlling the main Thread
16 Create a second thread
17 Create a second thread by extending Thread
18 Create a thread to update Swing
19 Create ExecutorService to manage threads
20 Create multiple threads
21 Creating a Bounded Work Queue
22 Creating a piped communications system between two threads
23 Creating a Thread
24 Creating Thread
25 Creating Thread Objects
26 Daemon and User Threads
27 Deal with lock
28 Demonstrate thread groups
29 Demonstrate thread priorities
30 Determining If the Current Thread Is Holding a Synchronized Lock
31 Flag Communication
32 Get current thread
33 Get parent thread group
34 Guarantee that threads are woken in the same order in which they waited
35 Handle concurrent readwrite
36 Implementing an Unbounded Work Queue with synchronized block
37 Interrupt a thread
38 JDK1 5 provides a mechanism to create a pool a scheduled task
39 Listing all threads and threadgroups in the VM
40 Minimum and Maximum Priority Threads
41 Monitor a threads status
42 Pause the execution
43 Pause the execution of a thread using sleep()
44 Pausing a Thread
45 Pausing the Current Thread
46 Producer and comsumer with DataInputStream and DataOutputStream
47 Producer and consumer based on ReadableByteChannel and WritableByteChannel
48 Producer, consumer and Queue
49 Return a value from a thread
50 Simple thread pool A task is executed by obtaining a thread from the pool
51 Specify the number of milliseconds to wait for the death of a thread
52 Stopping a Thread
53 Stopping a Thread with interrupt()
54 Suspend, resume, and stop a thread
55 Suspending and resuming a thread the modern way
56 Synchronized Queue with Producer and Consumer
57 Test Synchronized method
58 Test Unsynchronized method
59 This class demonstrates how to set Priority
60 This program is not synchronized
61 This program uses a synchronized block
62 Thread Join Demo
63 Thread-Safe Collections
64 To determine whether a thread has been interrupted
65 Two threads manipulating an unsynchronized buffer
66 Use wait() and notify() from Object class
67 Using a Thread-Local Variable
68 Using join() to wait for threads to finish
69 Wait for the threads to finish
70 Wait the for the completion of a thread
71 Wait() and notify() must only be issued inside a synchronized block
72 Waiting on an object