My problem is best explained by the architecture below
Basically, I have to purge the contents of an NSMutableData
object (or any other object, for that matter) in real time, i.e., I can't block its containing thread. Is there a way/API to do this?
update: As mentioned in the comments below.. i'm receiving audio packets in real time to the main thread and immediately route it to a dedicated audio pool thread.. (the reason why i got so many threads is b/c i have no control over the reception of the incoming packets.. they come in real time + the rate of playback is a lot slower than the rate of receiving data.. thus the seperate audio pool thread and the reader thread)