Ultralite multithreading question

Subject:Ultralite multithreading question
Date:10/05/2000
Author:jgugliemino <jgugliemino@my-deja.com>

 << previous  �  next >>
I am looking at using Ultralite to run as part of an embedded system under
VxWorks on a PowerPC.  I've just been looking at the doc so far (no coding
yet) and came across an important point.

I read in the SQL Anywhere doc "UltraLite applications should not be created
where multiple threads access the database simultaneously, as
multi-threading is not supported"

I'd like a quick clarification.  Does this mean that I should wrap the
actual execute with a semaphore, or does this mean the whole statement
prep/execute/cursor processing sequence need to be atomic?  In other words,
if I have 2 threads each interested in running selects, can they do their
setup at (possibly) the same time, sequence the executions using a
semaphore, and then examine the results (possibly) at the same time?  Or,
will the 2nd query stomp on the cursor from the 1st query, giving me
unpredictable results?




--
David Fishburn
Sybase - iAnywhere Solutions
Professional Services
Please only post to the newsgroup

EBFs and Whitepapers
http://www.sybase.com/products/mobilewireless/anywhere/


0
David
10/11/2000 7:13:32 PM
sybase.sqlanywhere.ultralite 2982 articles. 0 followers. Follow

1 Replies
321 Views

Similar Articles

[PageSpeed] 11

You should create an abstraction on top of UL for the rest of your program
to use. This abstraction can then serialize all access to the UL database
using a semaphore. Different selects will not affect each other's row data.
If you update, insert, or delete rows, the changes will affect select row
data.

--
David Fishburn
Sybase - iAnywhere Solutions
Professional Services
Please only post to the newsgroup

EBFs and Whitepapers
http://www.sybase.com/products/mobilewireless/anywhere/

"David Fishburn" <fishburn@spam_off_sybase.com> wrote in message
news:DL83ak7MAHA.280@forums.sybase.com...
> Subject:Ultralite multithreading question
> Date:10/05/2000
> Author:jgugliemino <jgugliemino@my-deja.com>
>
>  << previous  �  next >>
> I am looking at using Ultralite to run as part of an embedded system under
> VxWorks on a PowerPC.  I've just been looking at the doc so far (no coding
> yet) and came across an important point.
>
> I read in the SQL Anywhere doc "UltraLite applications should not be
created
> where multiple threads access the database simultaneously, as
> multi-threading is not supported"
>
> I'd like a quick clarification.  Does this mean that I should wrap the
> actual execute with a semaphore, or does this mean the whole statement
> prep/execute/cursor processing sequence need to be atomic?  In other
words,
> if I have 2 threads each interested in running selects, can they do their
> setup at (possibly) the same time, sequence the executions using a
> semaphore, and then examine the results (possibly) at the same time?  Or,
> will the 2nd query stomp on the cursor from the 1st query, giving me
> unpredictable results?
>
>
>
>
> --
> David Fishburn
> Sybase - iAnywhere Solutions
> Professional Services
> Please only post to the newsgroup
>
> EBFs and Whitepapers
> http://www.sybase.com/products/mobilewireless/anywhere/
>
>


0
David
10/11/2000 9:18:03 PM
Reply: