android NDK实现的Hanlder-消息队列-native多线程实例

上传者: z1074971432 | 上传时间: 2021-04-26 09:07:57 | 文件大小: 635KB | 文件类型: ZIP
研究一个native实现的虚拟机,在需要同时跑多个的情景下研究多线程,消息队列, 本实例实现了一个 消息队列 和 Handler 接口仿照 Java 层 Handler 使用起来很方便,很强大!

文件下载

资源详情

[{"title":"( 53 个子文件 635KB ) android NDK实现的Hanlder-消息队列-native多线程实例","children":[{"title":"TestJNI","children":[{"title":"bin","children":[{"title":"res","children":null,"spread":false},{"title":"classes","children":[{"title":"com","children":[{"title":"yichou","children":[{"title":"test","children":[{"title":"jni","children":[{"title":"MainActivity.class <span style='color:#111;'> 2.18KB </span>","children":null,"spread":false},{"title":"BuildConfig.class <span style='color:#111;'> 347B </span>","children":null,"spread":false},{"title":"MainActivity$1.class <span style='color:#111;'> 707B </span>","children":null,"spread":false},{"title":"R$layout.class <span style='color:#111;'> 406B </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 396B </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 410B </span>","children":null,"spread":false},{"title":"R$dimen.class <span style='color:#111;'> 464B </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 343B </span>","children":null,"spread":false},{"title":"R$menu.class <span style='color:#111;'> 391B </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 683B </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 475B </span>","children":null,"spread":false},{"title":"R$style.class <span style='color:#111;'> 434B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"AndroidManifest.xml <span style='color:#111;'> 951B </span>","children":null,"spread":false}],"spread":true},{"title":"res","children":[{"title":"drawable-ldpi","children":null,"spread":false},{"title":"values-v11","children":[{"title":"styles.xml <span style='color:#111;'> 334B </span>","children":null,"spread":false}],"spread":true},{"title":"menu","children":[{"title":"main.xml <span style='color:#111;'> 263B </span>","children":null,"spread":false}],"spread":true},{"title":"values-v14","children":[{"title":"styles.xml <span style='color:#111;'> 391B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 5.27KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 7.84KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 13.24KB </span>","children":null,"spread":false}],"spread":true},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 224B </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 697B </span>","children":null,"spread":false},{"title":"dimens.xml <span style='color:#111;'> 220B </span>","children":null,"spread":false}],"spread":true},{"title":"values-sw720dp-land","children":[{"title":"dimens.xml <span style='color:#111;'> 277B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 2.83KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-sw600dp","children":[{"title":"dimens.xml <span style='color:#111;'> 203B </span>","children":null,"spread":false}],"spread":true},{"title":"layout","children":[{"title":"activity_main.xml <span style='color:#111;'> 666B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"proguard-project.txt <span style='color:#111;'> 781B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"local","children":[{"title":"armeabi","children":[{"title":"libTestJNI.so <span style='color:#111;'> 101.86KB </span>","children":null,"spread":false},{"title":"objs","children":[{"title":"TestJNI","children":[{"title":"handler.o <span style='color:#111;'> 15.54KB </span>","children":null,"spread":false},{"title":"handler.o.d <span style='color:#111;'> 5.47KB </span>","children":null,"spread":false},{"title":"msgqueue.o <span style='color:#111;'> 8.56KB </span>","children":null,"spread":false},{"title":"msgqueue.o.d <span style='color:#111;'> 5.28KB </span>","children":null,"spread":false},{"title":"TestJNI.o.d <span style='color:#111;'> 9.45KB </span>","children":null,"spread":false},{"title":"TestJNI.o <span style='color:#111;'> 70.55KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"libstdc++.a <span style='color:#111;'> 8B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"ic_launcher-web.png <span style='color:#111;'> 85.80KB </span>","children":null,"spread":false},{"title":"assets","children":null,"spread":false},{"title":"gen","children":[{"title":"com","children":[{"title":"yichou","children":[{"title":"test","children":[{"title":"jni","children":[{"title":"BuildConfig.java <span style='color:#111;'> 161B </span>","children":null,"spread":false},{"title":"R.java <span style='color:#111;'> 2.44KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"jni","children":[{"title":"TestJNI.cpp <span style='color:#111;'> 4.71KB </span>","children":null,"spread":false},{"title":"msgqueue.h <span style='color:#111;'> 806B </span>","children":null,"spread":false},{"title":"Android.mk <span style='color:#111;'> 222B </span>","children":null,"spread":false},{"title":"msgqueue.c <span style='color:#111;'> 1.66KB </span>","children":null,"spread":false},{"title":"handler.h <span style='color:#111;'> 778B </span>","children":null,"spread":false},{"title":"handler.cpp <span style='color:#111;'> 1.65KB </span>","children":null,"spread":false},{"title":"Application.mk <span style='color:#111;'> 237B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"yichou","children":[{"title":"test","children":[{"title":"jni","children":[{"title":"MainActivity.java <span style='color:#111;'> 1.76KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 2.91KB </span>","children":null,"spread":false},{"title":".cproject <span style='color:#111;'> 11.26KB </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 475B </span>","children":null,"spread":false},{"title":"project.properties <span style='color:#111;'> 563B </span>","children":null,"spread":false},{"title":"AndroidManifest.xml <span style='color:#111;'> 951B </span>","children":null,"spread":false},{"title":"libs","children":[{"title":"armeabi","children":[{"title":"libTestJNI.so <span style='color:#111;'> 17.12KB </span>","children":null,"spread":false}],"spread":false},{"title":"android-support-v4.jar <span style='color:#111;'> 472.91KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}]

评论信息

  • shangrilachen :
    一个project代码实例,参考了。谢谢分享!
    2016-09-02
  • zql1982000 :
    代码可以使用,但是ndk里面其实是有hanlder的,可以直接使用,不用费劲自己写
    2016-07-05
  • 蚂蚁001 :
    挺不错的资料,谢谢分享.
    2016-01-20
  • 异次元空间1994 :
    很好,但是LOOPER使线程成为收到消息才运行了,不能做别的操作了
    2014-07-10
  • Pluto__Hades :
    挺不错的资料,谢谢分享.
    2014-01-07

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明