Cocoa and Valentina

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Jul 10 08:48:24 CDT 2003


on 7/10/03 3:59, Matthew Jew at mjew at icnc.com wrote:

Hi Matthew,

> Ruslan,
> 
> Another question regarding Cocoa:
> 
> Are there Cocoa equivalents for FBL_Thread and FBL_Task?

No classes from us.

> (I know that currently FBL_Thread is based on the PowerPlant LThread,
> which isn't used in the Cocoa framework.)

Not exactly. VSDK archive contains 3 thread clases

    Thread_PP       -- based on Powerplant
    Thread_Mac      -- based on pure MacOS.
                        Can be used in the MACHO/cocoa apps

    Thread_win      -- for Windows

> From the documentation, it seems that VSDK works with cooperative threads, and
> not pre-emptive threads.

Yes. Even on windows we "convert preemptive threads into cooperative."
This will be changed in 2.0
 
> If there are no cooperative threads in Cocoa, should I just create a single
> thread that handles all Valentina work, and the other threads should just hand
> off requests to that?

No. I recommend the next way:

1) in your cocoa app you can have as many threads as you need.
2) you have one global Mutex that a thread should lock before it access
Valentina records.
3) each thread should use its own cursor.

We use this way in Valentina Server alphas.

Again, in 2.0, when kernel will have own protections inside, global mutex
will not be needed.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list