[Adium-devl] Importer API
Peter Hosey
boredzo at gmail.com
Wed Apr 11 00:00:14 UTC 2007
On Apr 10, 2007, at 14:06:48, disposable at infinitenexus.com wrote:
> I'd say this would be even better as it matches patterns (at least
> in my experience):
>
> -(BOOL)importAccounts:(NSError **)err;
The problem is that it's synchronous. Putting the log importer on
another thread is pointless if the calling thread is just going to
wait around for it so that it can accept that BOOL return.
Solution: Make it asynchronous. Make it (particularly -importLogs)
spawn a thread and then return. The thread goes and does the thing to
the thing, then does a main-thread perform to call back the delegate
with the results.
And once you make one of them asynchronous, we may as well keep them
consistent and make the rest of them asynchronous.
___________________________________
\ Peter Hosey / boredzo at adiumx.com
PGP public key ID: C6550423 (since 2007-01-01)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070410/e430cf42/attachment.sig>
More information about the devel
mailing list