Multitasking is the apparent simultaneous execution of two or more tasks by a computer. Relevant implementation and usage details vary per operating system and programming language, so always add tags for both the OS and language when using this tag. Multitasking questions must be programming related.
Questions tagged [multitasking]
1008 questions
27
votes
7 answers
Sprite Kit & playing sound leads to app termination
using ARC
Just a problem I've run into-
I have an SKScene in which I play a sound fx using SKAction class method
[SKAction playSoundFileNamed:@"sound.wav" waitForCompletion:NO];
Now when I try to go to background, no matter that the sound was over,…

Lior Pollak
- 3,362
- 5
- 27
- 48
26
votes
2 answers
Design Patterns for Multithreading
Multitasking seems to be a disaster at times when big projects crashes due to shared mutation of I would say shared resources are accessed by multiple threads. It becomes very difficult to debug and trace the origin of bug and what is causing it. It…

Ankit Zalani
- 3,068
- 5
- 27
- 47
25
votes
5 answers
How to bring up the iOS multitasking bar in iOS iPad Simulator
I'm trying to test start state of my application when it is "freshly" launched, and when it is launched from a multitasking state. On an iPad a user can double click on the Home button twice to bring up the multitasking bar, and then you can close…

5StringRyan
- 3,604
- 5
- 46
- 69
23
votes
5 answers
The exact moment iOS takes the view snapshot when entering background?
I have a problem when putting my iPhone app to background by pushing the exit button, and then relaunching by tapping the launch icon on the home screen: the app's view does return to its initial state like I want it to, but before that it flashes…

Samuli Viitasaari
- 613
- 7
- 21
23
votes
1 answer
iOS Multi-Tasking Track GPS Location
I was just wondering if it was possible to make an iOS app that would track your location via GPS while it was in the background.
I tried this with the built-in app "Maps", but to no avail.
If this is possible, it would be great if you could refer…

Linuxmint
- 4,716
- 11
- 44
- 64
21
votes
2 answers
What is the difference between cooperative multitasking and preemptive multitasking?
Recently I was understanding for how threads are different from fibers.
This answer says that
Threads use pre-emptive scheduling, whereas fibers use cooperative
scheduling.
In order to get more information about cooperative multitasking vs…

Mayur
- 2,583
- 16
- 28
18
votes
0 answers
Remote Control Event Causing iOS to Terminate Background App
My app plays background audio using AVAudioPlayer and receives remote control events from iOS. Everything works fine while audio is playing, but if audio is paused and my app is moved into the background, something odd happens. If I use a…

Seth McFarland
- 251
- 1
- 6
17
votes
4 answers
Android Simulator: Easy way to simulate a process restart due to low memory?
As I just learned, Android reserves the right to kill a background application's process at any moment in order to recycle RAM. The application is still running and can be resumed nevertheless, but all of my static variables are gone (see this…

Adrian Grigore
- 33,034
- 36
- 130
- 210
17
votes
2 answers
Correct way to poll server in background
Assuming this is possible, I would like my iOS application, when backgrounded, to poll a server (i.e. essentially, retrieve the contents of a URL every 30 minutes and notify the user if it contains something "interesting"), essentially in a similar…

Neil Coffey
- 21,615
- 7
- 62
- 83
15
votes
3 answers
Can two processes simultaneously run on one CPU core?
Can two processes simultaneously run on one CPU core, which has hyper threading? I learn from the Internet. But, I do not see a clear straight answer.
Edit:
Thanks for discussion and sharing! My purse to post my question here is not to discuss…

Yiyu Jia
- 171
- 1
- 1
- 8
15
votes
4 answers
App inside an app
Is it possible to run an application from inside another application? What I want to do is write an app which allows you to chose an app to start, and then displays the activities of this app inside a view.
So in landscape mode, it should look…

PKlumpp
- 4,913
- 8
- 36
- 64
12
votes
2 answers
iOS 4 Alarm Clock App with Multitasking Support
I'm making an alarm clock app with multitasking support. However, I'm stuck with some limitations of the sdk.
I need to play selected alarm sound whenever the alarm time comes with some properties set by the user.
These properties:
- Alarm sound…

cocoatoucher
- 1,483
- 3
- 17
- 22
12
votes
2 answers
Detecting when app is becoming active from lockscreen vs other on iOS7
My app has different behavior when becoming active from the lockscreen (locked while active), or becoming active from anything else.
On iOS 6 and lower I could detect this
UIApplicationState state = [[UIApplication sharedApplication]…

coneybeare
- 33,113
- 21
- 131
- 183
12
votes
4 answers
Why threads starve even on preemptive multitasking OS (Windows 7)
I wrote a Win32 application (in Delphi-7 which is 32-bit using TThread class) to create 100 threads. Each thread when resumed will continuously (in a loop) increment a 64 bit counter associated with the thread object (so no locking or sharing of…

ssh
- 943
- 1
- 14
- 23
11
votes
3 answers
Preventing snapshot view of your app when coming back from multi-tasking
The problem is this - My app lets you passcode protect itself. I use an interface just like passcode protecting the phone. This has always worked fine, until multi-tasking came along.
The passcode protection still works, but there is one issue. …

Elijah
- 8,381
- 2
- 55
- 49