码迷,mamicode.com
首页 >  
搜索关键字:Future    ( 1492个结果
简单的邮件发送mail.jar
package com.future.portal.util;import java.io.IOException;import java.util.Date;import java.util.Properties;import javax.mail.Message;import javax.mai...
分类:其他好文   时间:2014-08-27 20:15:59    阅读次数:283
JAVA多线程实现和应用总结
1最近在做代码优化时学习和研究了下JAVA多线程的使用,看了菜鸟们的见解后做了下总结。1.JAVA多线程实现方式JAVA多线程实现方式主要有三种:继承Thread类、实现Runnable接口、使用ExecutorService、Callable、Future实现有返回结果的多线程。其中前两种方式线程...
分类:编程语言   时间:2014-08-26 21:18:26    阅读次数:273
Java并发——Callable和Future
Executor框架将工作单元划分为任务,即任务是逻辑上的工作单元,而线程是任务异步执行的机制。Runnable是任务的一个抽象,并且理想状态下任务是独立的执行,但是Runnable的run( )不能返回一个结果或者抛出一个受检查的异常,这与我们有些实际任务是不相符的。在通过线程或者executor执行Runnable任务中,不仅仅是不能返回任务的执行结果,有时我们希望可以控制某个任务,或取消或终止,但在executor中一旦提交任务,我们将很难单一的控制任务的生命周期,虽然ExecutorService扩...
分类:编程语言   时间:2014-08-26 15:30:36    阅读次数:283
每日一句(2014-8-25)
The best way to predict your future is to create it预测未来的最好方式就是去创造它The best way to predict you future is to create it预测未来的最好方式就是去创造它The best way to pre...
分类:其他好文   时间:2014-08-25 08:44:03    阅读次数:203
python高级编程之装饰器04
from__future__importwith_statement#-*-coding:utf-8-*-#python:2.x__author__='Administrator'#with和contextlib#对于要确保即使发生一个错误时也能运行一些清理代码而言,try...finally语句很...
分类:编程语言   时间:2014-08-20 22:26:32    阅读次数:282
puppet 3.6 错误提示 please explicitly set allow_virt
puppet 3.6 安装包的时候警告信息: ? ???Warning:?The?package?type‘s?allow_virtual?parameter?will?be?changing?its?default?value?from?false?to?true?in?a?future?release.?If?you...
分类:其他好文   时间:2014-08-13 19:34:07    阅读次数:286
Golden Pyramid
Golden PyramidOur Robo-Trio need to train for future journeys and treasure hunts. Stephan has built a special flat model of a pyramid. Now the robots ...
分类:其他好文   时间:2014-08-05 14:02:59    阅读次数:333
A trip through the Graphics Pipeline 2011_13 Compute Shaders, UAV, atomic, structured buffer
Welcome back to what’s going to be the last “official” part of this series – I’ll do more GPU-related posts in the future, but this series is long eno...
分类:其他好文   时间:2014-08-05 02:56:18    阅读次数:427
why using List list = new ArrayList() better than Arraylist list?
This is called programming to interface. This will be helpful in case if you wish to move to some other implementation of List in the future. If you w...
分类:其他好文   时间:2014-08-04 06:13:06    阅读次数:204
JAVA多线程实现的三种方式
JAVA多线程实现方式主要有三种:继承Thread类、实现Runnable接口、使用ExecutorService、Callable、Future实现有返回结果的多线程。其中前两种方式线程执行完后都没有返回值,只有最后一种是带返回值的。 1、继承Thread类实现多线程 继承Thread类的方法尽管被我列为一种多线程实现方式,但Thread本质上也是实现了Runnable接口的一个实例...
分类:编程语言   时间:2014-07-31 20:55:17    阅读次数:346
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!