1

I am fetching some system information e.g. processor name processor cores and many more and then showing them on NSTextFeild.

The issue is for the time the information is getting fetched, the application hangs.

So, I want to run the task asynchronously.

Note: I have just started with cocoa so please do describe your solution. pretty please.. thanks in advance.

1 Answer 1

1

Your UI hangs because you are doing work on the main thread. Hence this is a thread problem. You can then run that fetch for information on another thread, a background thread that doesn't interact with the UI, display something to the user that the data is currently getting retrieved and then, when the data is ready, display it in your NSTextField.

Read more

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.