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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,36a29c2860aff686 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!goblin2!goblin1!goblin.stu.neva.ru!newsfeed.straub-nv.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed01.chello.at!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Properties Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <3b84c8e7-1a51-4a7c-9646-119f1fc51478@s4g2000yql.googlegroups.com> <4pnv7nl4cdui$.1n28i7lqk4mek$.dlg@40tude.net> <1k7367gtebsgm$.18auo6u3nfg34.dlg@40tude.net> <1u5dftkqqi68c.10079qnqyyfwb$.dlg@40tude.net> <15tv4yga36dpi$.1hc09dlbgcmqe.dlg@40tude.net> <18768dde-5817-40b9-aaa1-03c620ad7187@i32g2000pri.googlegroups.com> <1sp30ekj4pmer$.1753nbz1zyzid$.dlg@40tude.net> Date: Thu, 2 Dec 2010 16:46:18 +0100 Message-ID: NNTP-Posting-Date: 02 Dec 2010 16:46:18 CET NNTP-Posting-Host: cebd9433.newsspool4.arcor-online.net X-Trace: DXC=N95U;^blYLQaoembcbF;DQ4IUK On Thu, 2 Dec 2010 07:25:20 -0800 (PST), Maciej Sobczak wrote: > On Dec 2, 11:26�am, "Dmitry A. Kazakov" > wrote: > >>> Why do you expect to get better guarantees from GUI than from stdout? >> >> Because in all Ada compilers I used so far this was safe. > > Safe? What is the benefit of safe if at the same time it's pointless? > > Put ("My "); > Put ("name "); > Put ("is "); > Put_Line ("Maciej"); > > I have multiple tasks doing it. What is safe for you? 1. It does not crash, the effect is defined 2. Put is atomic > Imagine a graphical display of > multi-line log messages. There is no point for such GUI to be task > safe, because GUI has no understanding of the logical granularity of > what is being displayed. The point is that tasks putting messages into the trace widget should have an ability to do this atomically independently on each other and the interface should be a procedure call. This is how the trace dialog window is implemented in the GtkAda contributions. Its interface procedure Trace can be called from any Ada task. >> A "reasonable" implementation of Text_IO queues I/O requests to some >> internal or external task/driver. I want same sort of design for graphical >> requests. > > Not necessarily. And there are lots of data structures that have to be > acted upon until you come close to the driver. These data structures > are vulnerable to corruption. Only if designed poorly. The requirement to be task-safe means that internally managed structures do not get corrupt when public interfaces are used. >> GUI is natively multitasking: >> >> 1. actions invoked by its controls are not instant: progress bar >> 2. some controls are active objects: animation widgets, visual effects, >> tooltips, hovering etc >> 3. indication of asynchronous events and data: oscilloscope > > How is that any different from standard output? What is different/same from what? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de