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 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: GTK and tasking (GNAT) Date: Sun, 4 May 2014 09:31:41 +0200 Organization: cbb software GmbH Message-ID: <1db3ntu987ypk$.6zu9ghm9azm0.dlg@40tude.net> References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: AuYlnUSfTZrfhAkRjyySpQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 1434 Xref: number.nntp.dca.giganews.com comp.lang.ada:186202 Date: 2014-05-04T09:31:41+02:00 List-Id: On Sat, 03 May 2014 17:30:08 -0300, hreba wrote: > Can somebody tell me what is wrong and how to do it right? 1. Gtk is not task-safe, which also includes Glib, Cairo etc. 2. Gtk are synchronous calls, when performed between tasks this may lead to deadlocking even in a task-safe environment, which Gtk is not. If you want to call to Gtk operations from an independent Ada task you must marshal it to the main task (the task running Gtk messages loop). An implementation of this mechanism is here: http://www.dmitry-kazakov.de/ada/gtkada_contributions.htm#1 -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de