Re: [sqlite] fast acces to one memory located table from two threads

2010-03-24 Thread Max Vlasov
One process, two threads. > I have found in documentation, that is not recommended to pass one > connection > from one thread to second one. > Yes, you're right, forgot about this, only exception is sqlite3_interrupt that can be called from other thread otherwise its existence makes no sense. But

Re: [sqlite] fast acces to one memory located table from two threads

2010-03-24 Thread Jakub Ladman
One process, two threads. I have found in documentation, that is not recommended to pass one connection from one thread to second one. A partial succes, relative fast function, is proven with database file stored in ramdisk. Hard disk file storage 16 inserts per second. Ramdisk file storage 150

Re: [sqlite] fast acces to one memory located table from two threads

2010-03-24 Thread Max Vlasov
> I need an application consisting two threads. > In one of them i need to store incomming "messages" (one message is 1 to 8 > bytes of data) to temporary table existing only in memory. > It needs to be fast, storing hundreds of messages per second. > There i have a trigger deleting old rows and

Re: [sqlite] fast acces to one memory located table from two threads

2010-03-23 Thread Jakub Ladman
Dne úterý 23 března 2010 19:22:35 Pavel Ivanov napsal(a): > I'd suggest you to use any kind of memory structure (like deque or :-) I do not know what is deque. > whatever you prefer) for transferring data from one thread to another. > Besides anything else it will be faster than using SQLite for

Re: [sqlite] fast acces to one memory located table from two threads

2010-03-23 Thread Teg
Yeah, I do this all the time with STL and a critical section lock. A list, or set and a lock is all you need. list of vectors for instance. Set if you want it to automatically reject duplicated, a list for just dumping data to it. C Tuesday, March 23, 2010, 2:22:35 PM, you wrote: PI> I'd

Re: [sqlite] fast acces to one memory located table from two threads

2010-03-23 Thread Pavel Ivanov
I'd suggest you to use any kind of memory structure (like deque or whatever you prefer) for transferring data from one thread to another. Besides anything else it will be faster than using SQLite for this particular task. As you have already understood there's no way you can make 2 connections to

[sqlite] fast acces to one memory located table from two threads

2010-03-23 Thread Jakub Ladman
Hello to all I am back here to mailing list after about two years and also back to programming with sqlite in general. I have new task and i do not know how to do it. I need an application consisting two threads. In one of them i need to store incomming "messages" (one message is 1 to 8