comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: GTK and tasking (GNAT)
Date: Sun, 4 May 2014 09:31:41 +0200
Date: 2014-05-04T09:31:41+02:00	[thread overview]
Message-ID: <1db3ntu987ypk$.6zu9ghm9azm0.dlg@40tude.net> (raw)
In-Reply-To: bsl1uhFd8asU1@mid.individual.net

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


  parent reply	other threads:[~2014-05-04  7:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-03 20:30 GTK and tasking (GNAT) hreba
2014-05-03 21:23 ` Simon Wright
2014-05-04 18:10   ` hreba
2014-05-04 18:29     ` Simon Wright
2014-05-04 22:10   ` hreba
2014-05-04  7:31 ` Dmitry A. Kazakov [this message]
2014-05-04 18:36   ` hreba
2014-05-04 19:26     ` Dmitry A. Kazakov
2014-05-04 20:40       ` hreba
2014-05-04 21:07         ` Shark8
2014-05-04 21:32           ` hreba
2014-05-04 21:44             ` Shark8
2014-05-04 21:57               ` hreba
2014-05-05  7:33             ` Dmitry A. Kazakov
2014-05-06 12:43               ` hreba
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox