GithubHelp home page GithubHelp logo

concurrency-programming-oc's Introduction

Concurrency-Programming-OC

Concurrency-Programming-OC study

###小结:

  • 直接启动 NSthread 需要自己管理调度,处理突发的大量并行业务,速度会快一些,就是感觉管理起来太麻烦。
  • 使用GCD 系统接管了线程管理,会慢一些,但比较省电。
  • 使用起来比android爽

concurrency-programming-oc's People

Watchers

 avatar

concurrency-programming-oc's Issues

GCD Study

Grand Central Dispatch,听名字就霸气。它是苹果为多核的并行运算提出的解决方案,所以会自动合理地利用更多的CPU内核(比如双核、四核),最重要的是它会自动管理线程的生命周期(创建线程、调度任务、销毁线程),完全不需要我们管理,我们只需要告诉干什么就行。同时它使用的也是 c语言,不过由于使用了 Block(Swift里叫做闭包),使得使用起来更加方便,而且灵活。

NSThread Study

http://www.jianshu.com/p/0b0d9b1f1f19

使用NSThread开启几百个线程,会吃掉很多应用内存,线程结束后会释放,但并发过程没有现成的 线程池管理并发不利,NSthread适合简单启动一个小工作。

Concurrency Programming Case

这个例子是一个,从股票网站批量获取400支股票信息,进行计算市值后展示的示例。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.