V4RB 3.0 and pre-emptive threads

Dave Addey listmail1 at dsl.pipex.com
Fri Jul 20 02:08:08 CDT 2007


Hi Ruslan,

Actually, I have one more question on threading:

Do I need to control access to Valentina with a mutex...

1) ...at a database level (so that only one thread is accessing each
database at a time)?  I usually have several databases open.

2) ...at an application level (so that only one thread is accessing anything
to do with Valentina at a time)?

3) ...actually, it doesn't matter, because the Valentina Kernel will block
any thread which tries to access Valentina whilst something is already
happening?  It will then unblock the thread when the first Valentina action
has completed. (This is a guess!)

I'm using V4RB 3.1 in REALbasic 2007r3, and am using Taylor Design's
"PreemptiveThreadTD" classes to run REALbasic code on a background thread.
I am running from a local file database, which is only even opened by this
one application.

Apologies for the continued questions - I want to make sure my use of
pre-emptive threads Valentina is completely safe.


> From: Ruslan Zasukhin <sunshine at public.kherson.ua>
> Reply-To: Valentina Developers <valentina at lists.macserve.net>
> Date: Thu, 19 Jul 2007 22:17:56 +0300
> To: "valentina at lists.macserve.net" <valentina at lists.macserve.net>
> Conversation: V4RB 3.0 and pre-emptive threads
> Subject: Re: V4RB 3.0 and pre-emptive threads
> 
> On 19/7/07 8:51 PM, "Dave Addey" <listmail1 at dsl.pipex.com> wrote:
> 
> Hi Dave,
> 
>> So if I made sure to perform all of my database access on one (and only one)
>> thread at a time, would that be safe?
> 
> Yes.
> 
>> I would need to be able to pass the
>> database access from thread to thread, I guess.  Would this be possible
>> somehow? 
> 
> In Valentina server we have N threads. Each thread do some own task e.g.
> Handle network tasks, and prepare something, or logs. But when thread need
> touch kernel, he get first of all access to some single global mutex. This
> ensure that only one thread touch kernel at moment.
> 
> In the near future we plan start increase parallelism of kernel. For example
> it looks easy enough allow that each thread do PARSING of SQL query
> parallel.
> 
> 
> Again, you need just use single mutex from few threads.
> 
> 
> -- 
> Best regards,
> 
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
> 
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
> 
> [I feel the need: the need for speed]
> 
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina




More information about the Valentina mailing list