From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.237.34.2 with SMTP id n2mr64600655qtc.5.1470377703152; Thu, 04 Aug 2016 23:15:03 -0700 (PDT) X-Received: by 10.157.13.51 with SMTP id 48mr4953349oti.7.1470377702061; Thu, 04 Aug 2016 23:15:02 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!j37no6788211qta.0!news-out.google.com!d68ni17285ith.0!nntp.google.com!f6no7480497ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 4 Aug 2016 23:15:01 -0700 (PDT) In-Reply-To: <1dde5cdf-f1a8-4e5d-8d7d-60c89c554f6a@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=95.173.128.204; posting-account=YB4WOgoAAABLG9D7qoJiPBc6EJSzsPDF NNTP-Posting-Host: 95.173.128.204 References: <5f464ccd-c532-4b4d-8f45-9f29ba41a326@googlegroups.com> <1dde5cdf-f1a8-4e5d-8d7d-60c89c554f6a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0ebd9eae-313d-4131-89c8-3cdb10937c2f@googlegroups.com> Subject: Re: Win32. Task or CreateThread From: George J Injection-Date: Fri, 05 Aug 2016 06:15:03 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:31291 Date: 2016-08-04T23:15:01-07:00 List-Id: =D0=BF=D1=8F=D1=82=D0=BD=D0=B8=D1=86=D0=B0, 5 =D0=B0=D0=B2=D0=B3=D1=83=D1= =81=D1=82=D0=B0 2016 =D0=B3., 7:25:45 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7= =D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C George J =D0=BD=D0=B0=D0=BF=D0= =B8=D1=81=D0=B0=D0=BB: > > So if you want the task to report back to GTK in any way (e.g. by movin= g=20 > > the progress bar) you must do it by communicating with the task running= =20 > > the main loop. You can find an example how do do this here: > >=20 > > http://www.dmitry-kazakov.de/ada/gtkada_contributions.htm#1.1 > > ....... > >=20 > > --=20 > > Regards, > > Dmitry A. Kazakov > > http://www.dmitry-kazakov.de >=20 > Hi All! I have a question for Gtk.Main.Routers, that i can't understand. > I have next: >=20 > type My_Record is > record > ....... > end record >=20 > type My_Record_Access is access all My_Record; >=20 > Test_Record_Access : My_Record_Access; >=20 > package Cb_Request is new Gtk.Main.Router.Generic_Callback_Request(User_D= ata =3D> My_Record); >=20 > task type My_Task is -- works well > entry Start; > end My_Task; >=20 > task body My_Task is > begin > accept Start; >=20 > Cb_Request.Request(Some_Proc'Access,Test_Record_Access); -- all ok >=20 > end My_Task; >=20 >=20 > But I need to send parameter to discriminant like this=20 > .. in some proc=20 > Some_Task.Start(Test_Record_Access) >=20 > and decl: >=20 > task type My_Task is -- works bad > entry Start(Rec_Acc:My_Record_Access); > end My_Task; >=20 > task body My_Task is > begin > accept Start(Rec_Acc:My_Record_Access) do > Cb_Request.Request(Some_Proc'Access,Rec_Acc); -- "freezed" > end Start; > end My_Task; >=20 >=20 > ----------- > I've debugged code and found: > ...Gtk.Main.Routers(448) >=20 > procedure Request (Data : in out Request_Data'Class) is > begin > if Main =3D Current_Task then > Service (Data); > elsif Main =3D Null_Task_ID then > Log > ( GtkAda_Contributions_Domain, > Log_Level_Critical, > "No main task active" & Where ("Request") > ); > raise Program_Error; > else > Gateway.Request_Service (Data, Standard.True);--<<---STOPPED HER= E!!!! > end if; > end Request; >=20 > So I can understand, why it happened?can smb help with this!Thanks! Oh, I've got another one! if i change task body My_Task is begin accept Start;=20 Cb_Request.Request(Some_Proc'Access,Test_Record_Access); -- all ok= =20 end My_Task; to=20 task body My_Task is begin accept Start do=20 Cb_Request.Request(Some_Proc'Access,Test_Record_Access); -- become= s "freezed" end Start; end My_Task; i cant exec my proc again.