Skip to Content
안드로이드 멀티스레딩: 비동기 메커니즘으로 날렵하고 안정적인 앱 만들기
book

안드로이드 멀티스레딩: 비동기 메커니즘으로 날렵하고 안정적인 앱 만들기

by 한대희, 안데르스 예란손
April 2016
Beginner to intermediate
308 pages
7h 21m
Korean
Hanbit Media, Inc.
Content preview from 안드로이드 멀티스레딩: 비동기 메커니즘으로 날렵하고 안정적인 앱 만들기
215
10
-
AsyncTask로 백그라운드 태스크를 UI 스레드에 묶기
|
targetSdkVersion
>
=
13
|
execute
API
레벨
13
이상인 플랫폼에서 순차 실행을 한다.
CAUTION
_
execute
의 실행 동작은 플랫폼의
API
레벨과 응용프로그램의 매니페스트
Manifest
파일 내의
targetSdkVersion
에 따라 달라진다.
모든 플랫폼 버전에서 응용프로그램의 일관된 실행 동작을 원한다면
targetSdkVersion
을 설
정하여 처리해야 한다.
API
레벨
13
까지
AsyncTask
를 사용하는 모든 플랫폼 버전에서 순차적인 실행을 이루는 것은 불
가능하다.
3
모든 플랫폼 버전에서의 동시 실행은 플랫폼 버전에 따라
targetSdkVersion
<
13
+
로 설정하거나 실행자를 직접 변경해야 가능하다.
| 일관된 순차 실행 |
execute
는 동시에 실행하고,
executeOnExecutor
API
레벨
11
이전에는 사용할 수 없으므
AsyncTask
인스턴스의 순차 실행은
API
레벨
4
~
10
에서는 보장될 수 없다. 대신 일관된 순
차 실행을 요구하는 백그라운드 태스크는
Executors
.
newSingleThreadExecutor
(
9
장) 또는
HandlerThread
(
8
장)를 사용해야 한다.
| 일관된 동시 실행 |
targetSdkVersion ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

코드로 인프라 관리하기: 효율적인 인프라 관리를 위한 자동화 방법

코드로 인프라 관리하기: 효율적인 인프라 관리를 위한 자동화 방법

강재준

Publisher Resources

ISBN: 9788968481703