Hi Przemek,

Il 16/12/2008 2.01, Przemyslaw Czerpak ha scritto:

And as you state above, there are some sets that is useful to have shared.
So how can I share it ?

You have to change set.c and implement their low level storage and actions
in shared area but in this case I think it's still not the thing you are
asking for. I think you will want to stop all threads in some arbitrary
point and execute bkg task by one of existing threads and then wake up
all. It's possible and GC uses it though with some additional conditions
but it's not good idea to create other code which make sth like that.


I wish to emulate same syntax I have in bkg tasks ST mode. But only to start / stop all BTs together.

Probably I can solve putting all requests of adding tasks in stack then with
SET BACKGROUNDTASKS ON
I will start all threads, instead to start them at any single hb_backgroundtasksAdd() function and to have same functionality of BT TASKS once they are started guard them using s_Stop var of your sample.

F.e. in bkg tasks, if you do not want to change cursor position during
screen update then you should use screen functions which does not change it.
Save/restore row()/col() do not help because these are yet another functions
which change cursor position when other threads still may use it.

F.e. in the code below thread display clock. It uses HB_DISPOUTAT() to not
change cursor position. Check what will happen if you will use DISPOUTAT().


but is there a way to lock/unlock screen in update ?

I have seen you last sample mttest11.prg, but it is only for a single hb_dispoutat(), and this is fine and works correctly, but if there is need to update a full screen before another task can update it I wonder if there is a way to use a syntax like DispBegin() / DispEnd() that in middle put other screen update requests in wait state.

Best Regards

Francesco
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to