comp.lang.ada
 help / color / mirror / Atom feed
From: Fionn Mac Cumhaill <invisible@hiding.from.spam>
Subject: Re: Need info about Ada tasks
Date: Fri, 26 Sep 2008 12:46:52 GMT
Date: 2008-09-26T12:46:52+00:00	[thread overview]
Message-ID: <6vlpd4tho80qpm9vduvhggdeg3np867cvc@4ax.com> (raw)
In-Reply-To: umyhv1a2l.fsf@stephe-leake.org

On Fri, 26 Sep 2008 06:21:54 -0400, Stephen Leake
<stephen_leake@stephe-leake.org> wrote:

>Fionn Mac Cumhaill <invisible@hiding.from.spam> writes:
>
>> I am using the MingW Ada compiler and the GWindows packages on Windows
>> XP.
>>
>> I am writing a simple program which observes a table in SQL Server
>> 2000 and lists its rows to a visible screen display. I need a simple
>> task structure that can update the display periodically, with a
>> specified wait time between updates. I need to be able to abort the
>> display task at any time when the display is not being updated.
>
>Mixing tasking and GUI events can be problematic; only one thread
>can call GUI functions.
>
>The canonical solution to your problem is to use a Win32 timer, and
>update the display in the timer event handler function. 
>
>Then "abort the display task" becomes "disable the timer".
>
>Although Dmitry solved your immediate problem, it might be better to
>use a different example problem to study tasking.

Mixing tasking and GUI events does indeed cause problems. The very
first subroutine call in the task object which can cause a Gui event
does not return when called.



  reply	other threads:[~2008-09-26 12:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-25 13:31 Need info about Ada tasks Fionn Mac Cumhaill
2008-09-25 13:49 ` Dmitry A. Kazakov
2008-09-26  5:06   ` Fionn Mac Cumhaill
2008-09-26 10:21 ` Stephen Leake
2008-09-26 12:46   ` Fionn Mac Cumhaill [this message]
2008-09-27  5:56     ` Randy Brukardt
2008-09-27  7:48       ` Dmitry A. Kazakov
replies disabled

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