On 11/13/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > If you use the idiom whereby each thread solely takes its tasks > from a thread-safe work queue, you can have a clear separation of > responsibilities and minimal or preferably no shared-state between > threads. You get concurrency as a side effect of this simple hybrid > event-passing/thread scheme.
That model is one Windows NT has explicit support for. Its "I/O Completion Port" is essentially a message queue that worker threads can wait on for tasks. In cooperation with the scheduler, it tries to keep exactly as many threads as there are CPU cores active at any given time, such as by waking a new thread when a busy one blocks for I/O. In the context of sqlite, though, I don't see much point to sharing a single connection across threads. I'd prefer to just dedicate a message-based thread to the job. ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------