Python*

Android开发中的多线程编程技术

多线程这个令人生畏的“洪水猛兽”,很多人谈起多线程都心存畏惧。在Android开发过程中,多线程真的很难吗?多线程程序的“麻烦”源于它很抽象、与单线程程序运行模式不同,但只要掌握了它们的区别,编写多线程程序就会很容易了。下面让我们集中精力开始学习吧!

  多线程案例——计时器

  我在给我的学生讲多线程的时候都会举一个计时器的案例,因为计时器案例是多线程的经典应用。

  这个案例中,屏幕启动之后,进入如图8-1所示的界面。

  屏幕上有一个文本框用于显示逝去的时间,此外还有一个“停止计时”按钮。案例的用例图如图8-2所示。

  

  ▲图8-1 计时器界面

  • Desarrolladores
  • Desarrolladores para Intel AppUp®
  • Android*
  • MeeGo*
  • Moblin*
  • Apple Mac OS X*
  • Tizen*
  • Unix*
  • Android*
  • Tizen*
  • .NET*
  • HTML5
  • Java*
  • Python*
  • Principiante
  • Las API de Intel® Web
  • Tecnología Intel® Active Management
  • Computación con clústeres
  • Architecture Pattern: Compute On Demand

    There are so many examples of applications using pre-processing strategy that it is trivial. For example using a webcam we often find the device driver doing some software adjustments and corrections such as white balancing. Too often we find devices using software features. Other examples would be in a pipeline and User Interfaces. When it comes to UI we already learned to fill the list when the user clicks the drop-down, so only when the user really wants to use the list we will "pay" for the data.

    Intel® Math Kernel Library(Intel® MKL) 11.0 Initial Release

    Intel® Math Kernel Library (Intel® MKL) is a highly optimized, extensively threaded, and thread-safe library of mathematical functions for engineering, scientific, and financial applications that require maximum performance. The Intel MKL 11.0 packages are now ready for download.

  • C/C++
  • Java*
  • Python*
  • Intel® Math Kernel Library
  • Páginas

    Suscribirse a Python*