Joe, Im interested to know what those constraints are and why ?
The only reason i mentioned shared memory is because it provides a platform and filesystem agnostic way of handling ipc. Obvioulsy i dont know the ins and outs of the locking process, but i just thought it would make sense to have a single unified model rather than different strategies on many platforms. On 12/29/06, Joe Wilson <[EMAIL PROTECTED]> wrote:
--- Emerson Clarke <[EMAIL PROTECTED]> wrote: > Developing multithreaded applications is difficult, i wouldnt dispute > that. But i do dispute the wisdom of actively making a library > incompatible with threads. "Actively"? That's a bit much. There are constraints on the ability to pass SQLite connections between threads. To be safe, just use the connection on the same thread it was created and you'll be fine. > Sqlite is the first example of such > behaviour i have seen, it deliberately fails even if the user attempts > to synchronise concurrent access. > > Surely it would be better to design the api so that it was either > fully thread safe and blocked on every call to an sqlite_ function > using its own mutexes, or to simply ensure that it was process safe > using shared memory. As i mentioned in a previous reply, > synchronising sqlite would be no more or less difficult or error prone > than synchonising a linked list. You're free to serialize your calls to SQLite in your own code. Take a look at the many wrappers for SQLite for ideas. Shared memory is not the answer. It's a nightmare to manage and creates more problems than it solves. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------
----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------