一、为什么重写mythread类里写了run()在main里没有调用,而调用了没有写的start() start()让run()在新线程里面运行。你直接调用run()就是在当前线程运行了。 start()调用_thread的start_new_thread去运行一个bootstrap方法,在里面做一...
分类:
编程语言 时间:
2015-02-06 18:30:22
阅读次数:
159
版本一:#coding:utf-8import Queueimport threadingimport timeimport urllib2import reexitFlag = 0class myThread (threading.Thread): def __init__(self, threa...
分类:
编程语言 时间:
2015-02-06 18:27:08
阅读次数:
137
# -*- coding:utf8 -*-from bs4 import BeautifulSoupimport os, sys, urllib2, urllibimport thread, threadingclass downloader(threading.Thread): """docstr...
分类:
编程语言 时间:
2015-02-06 18:11:00
阅读次数:
201
1.什么是Handler?SDK中关于Handler的说明例如以下:A Handler allows you to sendand process Messageand Runnable objects associated with a thread'sMessageQueue.Each Hand...
分类:
其他好文 时间:
2015-02-06 14:41:38
阅读次数:
143
1 1、private static ManualResetEvent posReceiveDone = new ManualResetEvent(false); 2 3 2、posThread = new Thread(delegate() { Pos(); }); posThread.Sta.....
分类:
编程语言 时间:
2015-02-06 12:41:21
阅读次数:
147
该源码实现了一款很不错的猜牌游戏源码完整版,喜欢的朋友可以下载学习看看。
项目游戏源码下载:http://code.662p.com/view/1463.html
详细说明:http://android.662p.com/thread-60-1-1.html...
分类:
其他好文 时间:
2015-02-06 11:28:05
阅读次数:
167
android游戏开发实例————桌面类游戏——《激情台球》
还有地图编辑源码和ppt
此系列游戏代码皆为 android游戏开发教程一书,仅为开发教学演示,非上线游戏代码
游戏项目源码下载:http://code.662p.com/view/3382.html
详细说明:http://android.662p.com/thread-750-1...
分类:
其他好文 时间:
2015-02-06 11:28:03
阅读次数:
125
一款ios塔防类游戏源码 ,一款像素风格的防御类游戏源码。老鼠向目标进攻,点击老鼠就可以直接把老鼠拍死。或者像《水果忍着》那样滑动屏幕将目标弄死,大家可以看看吧。
项目源码下载:http://code.662p.com/view/6308.html
详细说明:http://ios.662p.com/thread-1449...
分类:
移动开发 时间:
2015-02-06 11:24:25
阅读次数:
167
该源码实现了一款很不错的猜牌游戏源码完整版,喜欢的朋友可以下载学习看看。项目游戏源码下载:http://code.662p.com/view/1463.html详细说明:http://android.662p.com/thread-60-1-1.html
分类:
其他好文 时间:
2015-02-06 10:53:41
阅读次数:
115
服务器端的TCP
class ServiceSocket extends Thread{
public void run(){
ServerSocket serversocket=null;
try {
serversocket =new ServerSocket(7980);
Socket socket= serversocket.accept();
...
分类:
移动开发 时间:
2015-02-06 09:36:27
阅读次数:
172