in reply to Taking advantage of dual processors [tag://parallel,cygwin,multi-core,fork,i/o]

Running the commit in another thread is obvious, but you need to check if SQLite is thread-safe (others will know). But there are different approaches.

You can split up your data (lines in the file) and run two processes or threads each handling half of the data. I suggest that this might be simpler to implement - and safer since they should not be stomping on each other (assuming database functionality).

Or you could split up the task, doing the comparisons in one thread and the write-out in another. That would be more fiddly to implement, since you have to pass data between threads.
  • Comment on Re: Taking advantage of dual processors [tag://parallel,cygwin,multi-core,fork,i/o]

Replies are listed 'Best First'.
Re^2: Taking advantage of dual processors [tag://parallel,cygwin,multi-core,fork,i/o]
by metaperl (Curate) on Nov 19, 2007 at 21:15 UTC
    Your advice is a little above my head. I asked for modules or functions... and was subconsciously desiring small code snippets..
    I have beheld the tarball of 22.1 on ftp.gnu.org with my own eyes. How can you say that there is no God in the Church of Emacs? -- David Kastrup