One table - several threads 
Author Message
 One table - several threads

Hello World,

like Ollie (next thread) I have a problem with accessing one table from
different sides - in my case threads. Because it is not working I am not
able to help Ollie...  :-(

I am using FlashFiler but I guess this is _not_ the cause of the problem...
;-)   I am retrieving data with threads of the same instance and writing
the data to the DB. But the DB gets messed up. Every thread has its own
Session, Client, Database and Tables.

- The different threads may be doing different things in the DB - one
writing while another is filtering. This should be thread-safe, shouldn't
it?

- I have two different sorts of threads and am using several instances of
every thread-sort. The two thread-sorts inherit from one "virtual"
Ancestor-Thread. In this Ancestor-Thread the Session, Client, Database and
Tables are defined as "private". Could that be the problem? Should I use
"threadvar" - but where?

I am "a bit" lost. I would be _very_ happy about someone pointing me into
some "correct" direction. I know that long questions usually never get an
answer...    ;-)

Thanks a lot in advance!

Jens



Tue, 22 Nov 2005 17:14:11 GMT  
 One table - several threads
One database... one disk drive... no need for multiple threads.  It won't
speed anything up and, as you see, it will cause difficult-to-diagnose
bugs.

Quote:

> Hello World,

> like Ollie (next thread) I have a problem with accessing one table from
> different sides - in my case threads. Because it is not working I am not
> able to help Ollie...  :-(

> I am using FlashFiler but I guess this is _not_ the cause of the
> problem...
> ;-)   I am retrieving data with threads of the same instance and writing
> the data to the DB. But the DB gets messed up. Every thread has its own
> Session, Client, Database and Tables.

> - The different threads may be doing different things in the DB - one
> writing while another is filtering. This should be thread-safe, shouldn't
> it?

> - I have two different sorts of threads and am using several instances of
> every thread-sort. The two thread-sorts inherit from one "virtual"
> Ancestor-Thread. In this Ancestor-Thread the Session, Client, Database and
> Tables are defined as "private". Could that be the problem? Should I use
> "threadvar" - but where?

> I am "a bit" lost. I would be _very_ happy about someone pointing me into
> some "correct" direction. I know that long questions usually never get an
> answer...    ;-)

> Thanks a lot in advance!

> Jens

--
----------------------------------
Fast automatic table repair at a click of a mouse!
http://www.sundialservices.com/products/chimneysweep


Sat, 26 Nov 2005 05:40:25 GMT  
 One table - several threads

Quote:

> One database... one disk drive... no need for multiple threads.  It
> won't speed anything up and, as you see, it will cause
> difficult-to-diagnose bugs.

I'm glad someone else thinks this way. I've read a few messages here and
there about threads, and can't see for the life of me how they're going to
make an already difficult situation any easier.

Thanks



Mon, 28 Nov 2005 22:50:04 GMT  
 One table - several threads

Quote:

> One database... one disk drive... no need for multiple threads.  It won't
> speed anything up and, as you see, it will cause difficult-to-diagnose
> bugs.

Well, I am collecting my data (i.e. "emails") via POP3 - so there is a good
reason for threads...   ;-))

But I will think about this and play a little with "Synchronize"...

Thanks for your answer!

Jens



Sun, 18 Dec 2005 03:42:03 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. One Big Table or Several Small Tables?

2. Tricky transaction problem: Catching EDatabaseError from one of several Post within a transaction

3. Catching EDatabaseError from one of several Post within a transaction

4. Several insert in one statement, is it possible?

5. Several Paradox probs that no one can explain...

6. Several EXEs share one Oracle connection?

7. Two tables, one SQL query, one DBGrid?

8. Local SQL - JOINs to several tables?

9. How to Display Search Results Across Several Tables

10. Can ReportSimth report from 12 tables as if they were in one big table

11. Threaded Database Updates with Paradox Tables.

12. Paradox tables and Multi-Threading

 

 
Powered by phpBB® Forum Software