On 2008-07-14 11:21:21 -0700, Christiaan Hofman <[EMAIL PROTECTED]> said:
> > On 14 Jul 2008, at 7:49 PM, Adam Maxwell wrote: > >> On 2008-07-14 10:10:15 -0700, Christiaan Hofman <[EMAIL PROTECTED]> >> said: >>> The main reason it's set in the main thread is that a running (long) >>> task may decide to stop executing, e.g. in a long while-loop. If >>> shouldKeepRunning is set to 0 on the server thread it won't happen >>> till the current calculation has finished. >> >> It won't happen until the end of the calculation loop anyway unless >> the >> calculation loop runs the runloop and checks that flag, though, right? >> > > It may. The shouldKeepRunning flag is checked in various places, in > particular in while-loops, so the long loops are terminated when it is > reset. Good point, although I don't see -[BDSKAsynchronousDOServer shouldKeepRunning] used in any loops at this time. Probably worth a comment in the code. > That's very important. For example the file content search > index can take an hour, so it is important that it knows when it's no > longer needed. Did you change file content search to use BDSKAsynchronousDOServer instead of a queue? -- adam ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Bibdesk-develop mailing list Bibdesk-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-develop