Hi, this may better belong somewhere else, but I like it here, so I thought I'd ask here first:
I am accessing the standard preferences file, which is documented to not be thread safe. So I want to keep all access to the prefs going through one process, so that it can't possibly try to access a second item in the middle of accessing the first. ... sooooooo
I have a number of different nib files that all need access to various prefs. Is it enough to keep one instance of one class in one nib in charge of the prefs file, taking requests from any other nib / object? Will this make sure that 2 prefs aren't asked for at the exact same time?
IE, is it reasonable to think of one thread per nib, and that no other threads are going to try to execute that nib's code? I'm in java, and I know java daes aggressive inlining of everything, but it shouldn't violate this.
Hell, I'll take guesses if you guys don't have real answers.
I am accessing the standard preferences file, which is documented to not be thread safe. So I want to keep all access to the prefs going through one process, so that it can't possibly try to access a second item in the middle of accessing the first. ... sooooooo
I have a number of different nib files that all need access to various prefs. Is it enough to keep one instance of one class in one nib in charge of the prefs file, taking requests from any other nib / object? Will this make sure that 2 prefs aren't asked for at the exact same time?
IE, is it reasonable to think of one thread per nib, and that no other threads are going to try to execute that nib's code? I'm in java, and I know java daes aggressive inlining of everything, but it shouldn't violate this.
Hell, I'll take guesses if you guys don't have real answers.