Subject | Threads freezing |
---|---|
Author | apon@mail.ru |
Post date | 2001-05-31T01:57:41Z |
Hi, All!
I have two threads in my Database Application (C++ Builder 5.0, IBO
3.6, Interbase 6.01). The threads freez if frequently read to the
same record from the table (frequency 100 msec).
Is it possible simultaneously make in different threads?
void __ fastcall Ttest:: Execute ()
{
TIB_Connection* connect = new TIB_Connection (NULL);
connect- > Connected = true;
TIB_Query* query = new TIB_Query (NULL);
while (! Terminated)
{
flag = WaitForSingleObject (Event, TimeOut);
...
static AnsiString sSQL = " SELECT... ";
query- > SQL- > Clear ();
query- > SQL- > Add (sSQL);
query- > Execute();
query- > First ();
}
}
Please help.
Regards, Aleksander Ponomarev.
I have two threads in my Database Application (C++ Builder 5.0, IBO
3.6, Interbase 6.01). The threads freez if frequently read to the
same record from the table (frequency 100 msec).
Is it possible simultaneously make in different threads?
void __ fastcall Ttest:: Execute ()
{
TIB_Connection* connect = new TIB_Connection (NULL);
connect- > Connected = true;
TIB_Query* query = new TIB_Query (NULL);
while (! Terminated)
{
flag = WaitForSingleObject (Event, TimeOut);
...
static AnsiString sSQL = " SELECT... ";
query- > SQL- > Clear ();
query- > SQL- > Add (sSQL);
query- > Execute();
query- > First ();
}
}
Please help.
Regards, Aleksander Ponomarev.