Hi all, I am currently exploring different way to write multithreaded programs. Say I have a NSButton and a NSTextField, I also have a random string generator.
What I want to accomplish is that the string generator runs every x amount of seconds and updates the textfield, and when the button is pressed a random string is generated immediately while delaying the automatic run of the string generator by x amount of seconds. Say the string generator runs for 1 second and it isn't quite practical to have the whole UI freeze when it is running.
Any good suggestions? Thanks in advance.
What I want to accomplish is that the string generator runs every x amount of seconds and updates the textfield, and when the button is pressed a random string is generated immediately while delaying the automatic run of the string generator by x amount of seconds. Say the string generator runs for 1 second and it isn't quite practical to have the whole UI freeze when it is running.
Any good suggestions? Thanks in advance.