Concurrency-Programming-OC study
###小结:
- 直接启动 NSthread 需要自己管理调度,处理突发的大量并行业务,速度会快一些,就是感觉管理起来太麻烦。
- 使用GCD 系统接管了线程管理,会慢一些,但比较省电。
- 使用起来比android爽
Concurrency-Programming-OC study
Grand Central Dispatch,听名字就霸气。它是苹果为多核的并行运算提出的解决方案,所以会自动合理地利用更多的CPU内核(比如双核、四核),最重要的是它会自动管理线程的生命周期(创建线程、调度任务、销毁线程),完全不需要我们管理,我们只需要告诉干什么就行。同时它使用的也是 c语言,不过由于使用了 Block(Swift里叫做闭包),使得使用起来更加方便,而且灵活。
http://www.jianshu.com/p/0b0d9b1f1f19
使用NSThread开启几百个线程,会吃掉很多应用内存,线程结束后会释放,但并发过程没有现成的 线程池管理并发不利,NSthread适合简单启动一个小工作。
这个例子是一个,从股票网站批量获取400支股票信息,进行计算市值后展示的示例。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.