多线程

专注于多线程的开发与研究

导航

随笔分类 -  Java简单线程系列

摘要:代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;using System.Threading;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { long count = 0; while (... 阅读全文

posted @ 2012-05-18 07:41 threads

摘要:代码:import java.text.SimpleDateFormat;import java.util.Date;import java.util.concurrent.Executors;import java.util.concurrent.ExecutorService;import java.sql.*;public class thdd { public static void main(String[] args) throws InterruptedException { ExecutorService pool = Executors.newSingle... 阅读全文

posted @ 2012-05-17 22:44 threads

摘要:代码:import java.text.SimpleDateFormat;import java.util.Date;import java.util.concurrent.Executors;import java.util.concurrent.ExecutorService;import java.sql.*;public class thdd { public static void main(String[] args) throws InterruptedException { ExecutorService pool = Executors.newSingle... 阅读全文

posted @ 2012-05-16 07:57 threads

摘要:代码:import java.text.SimpleDateFormat;import java.util.*;import java.util.concurrent.Executors;import java.util.concurrent.ScheduledExecutorService;import java.util.concurrent.TimeUnit;public class thdd { public static void main(String[] args) { ScheduledExecutorService pool = Executors.new... 阅读全文

posted @ 2012-05-13 20:02 threads

摘要:代码:import java.text.SimpleDateFormat;import java.util.*;import java.util.concurrent.Executors;import java.util.concurrent.ScheduledExecutorService;import java.util.concurrent.TimeUnit;public class thdd { public static void main(String[] args) { ScheduledExecutorService pool = Executors.new... 阅读全文

posted @ 2012-05-13 19:59 threads

摘要:代码:import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;public class thdd { public static void main(String[] args) { ExecutorService pool = Executors.newCachedThreadPool(); // 创建实现了Runnable接口对象,Thread对象当然也实现了Runnable接口 for (int i = 0; i < 100; i++... 阅读全文

posted @ 2012-05-13 19:57 threads

摘要:代码:import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;public class thdd { public static void main(String[] args) { ExecutorService pool = Executors.newSingleThreadExecutor(); // 创建实现了Runnable接口对象,Thread对象当然也实现了Runnable接口 for (int i = 0; i < 100;... 阅读全文

posted @ 2012-05-13 19:52 threads

摘要:代码:import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;public class thdd { public static void main(String[] args) { ExecutorService pool = Executors.newFixedThreadPool(3); // 创建实现了Runnable接口对象,Thread对象当然也实现了Runnable接口 for (int i = 0; i < 100000; ... 阅读全文

posted @ 2012-05-13 19:46 threads

联系Email:ha666@ha666.com