ExecuteSQL() somewhat async?
Totte Alm
totte at code66.se
Thu Jan 30 10:27:36 CST 2003
torsdagen den 30 januari 2003 kl 10.01 skrev Ruslan Zasukhin:
>
> Or ask Totte, on this issue.
>
> I know that Totte also use intensively threads with VSDK.framework.
> Yes Totte?
I was doing this but I had to use critical regions so much to avoid
crashes that the preemptiveness was severly damaged. The solutions I've
done are:
(1) Some tasks like reading stuff into a database I do with oner MPTask
and the MainThread running the GUI, this works well as the only thread
touching Valentina is the MPTask. Btw MPTasks are carbon threads that
has some glue ontop pthreads to handle CarbonEvents.
(2) Things that needs to be async to the user , I launch separate
working tasks that is vbuild like #1 here and does the work Async.
Now WHY do I do this?
Mainly because things like Flush() has to be semaphored, and can take
several seconds, even up to alomost a minute sometimes, and during that
period of time, The user would not be able to do anything at all that
touches ANY valenina APIs, which wouyld render the app "dumb", as it
would have to show some kind of "Busy" info.
//Totte
>
------------------------------------------------------------------------
----------------------------
There are three kinds of people in the world: those who can count, and
those who can't.
More information about the Valentina
mailing list