Chapter 6. Android NDK Multithreading

In this chapter we will cover:

  • Creating and terminating native threads at Android NDK
  • Synchronizing native threads with mutex at Android NDK
  • Synchronizing native threads with conditional variables at Android NDK
  • Synchronizing native threads with reader/writer locks at Android NDK
  • Synchronizing native threads with semaphore at Android NDK
  • Scheduling native threads at Android NDK
  • Managing data for native threads at Android NDK

Introduction

Most non-trivial Android apps use more than one thread, therefore multithreaded programming is essential to Android development. At Android NDK, POSIX Threads (pthreads) is bundled in Android's Bionic C library to support multithreading. This chapter mainly discusses the API functions ...

Get Android Native Development Kit Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.