krasnyk
krasnyk

Reputation: 3508

How can i get a list of currently running threads in objective-C(iphone)

Is there a way to get the list of currently running threads in objective-C? I'm mostly interested in getting the NSThreads objects, cause i want to replace the assertion handler for each running thread?

If such thing is not possible, maybe i could set my own selector to be invoked after any thread is spawn(so that i could do the assertion handler replacement over there)?

Upvotes: 0

Views: 917

Answers (1)

David Gelhar
David Gelhar

Reputation: 27900

The "Assertions and Logging Programming Guide" says you can only set the assertion handler for the current thread:

You must execute these steps in the thread which you wish to modify; one thread cannot modify the thread attributes dictionary of another.

Upvotes: 2

Related Questions