On Sun, Feb 13, 2011 at 9:05 AM, Julian Turner <[email protected]> wrote:

>
> The challenge for complex operations for me will be mastering the
> continuation passing style.   For file synchronisation (my initial
> example) there is a pipeline of different operations, each with its
> own loops.  I will experiment further and share any interesting
> results.
>
>
maybe you could abstract the way you process the different operations so you
could do something generic that could be reused across multiple batch
process.. maybe something that would process as many items as possible until
it reaches 50-100ms of lock and than it would release the thread for updates
and continue processing the queue after a timeout..

breaking into smaller functions and calling them using a short timeout may
also help (even if it is not a long loop)... the key is to make things run
asynchronously.

PS: code complexity will probably increase a lot...

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to