[gtkada] GTK-Ada and tasking.

Preben Randhol randhol at pvv.org
Mon May 7 17:29:15 CEST 2001


prsa at systems.saab.se wrote on 07/05/2001 (17:08) :
> 
> Resend since my e-mail adress was changed.
> And I am still a member i hope.
> /Per
> ---------------------- Forwarded by PRSA/CelsiusTech on 2001-05-07 17:00
> ---------------------------
> 
> 
> PRSA
> 2001-05-07 09:05
> 
> To:   gtkada at gtkada.eu.org
> cc:
> Subject:  GTK-Ada and tasking.
> 
> When i execute the MIT-server i get the folowing errors.
> 
> Gdk-ERROR **: file gdkgc-win32.c: line 872 (gdk_gc_predraw): assertion failed: (data->xgc == NULL)
> aborting...
> abnormal program termination
> Process run exited abnormally with code 3
> Runing
>      Windows NT4
>      GNAT 3.14a
>      GtkAda 1.3.11
> 
> 
> My intent is to manke the object mit_server_main thrad-safe by putting
> a gdk.threads.enter and gdk.threads.leave around operatons to be called
> from working tasks.

If I put
   delay 0.01 
after 
   Put_Line("Test :"&Integer'Image(I));
   
in mit_server.adb the program seems to work on Linux. I get at least
1000 Test elements in the window.

You should put in some delays when you use threads so that the other
threads also get a chance to update.

-- 
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
                 «For me, Ada95 puts back the joy in programming.»




More information about the gtkada mailing list