Re: Tasking and wxWidgets




Martin Dowie wrote:
> Lucretia wrote:
> > 2) I could also go the other way and inside the
> > wx.Base.Object.Object_Type (wxObject) provide a mutex object, such
> > that every call in wxAda would lock (on entry) and unlock (on exit)
> > thus providing thread safety if that particular object were accessed
> > via multiple tasks. The overhead of constructing/destructing a mutex
> > locker object, locking/unlocking the mutex object on every call would
> > be rather high and thus, would most probably slow the application
> > down to a crawl (although, not tested). Use of inlining might make
> > this nicer?
>
> Is the different between a response in 0.1 seconds and 0.15 seconds
> particularly noticable with a GUI? I'm guessing at the actual times but
> surely they are going to be very small (to the human eye), no?...

Well, yeah. It is unlikely that wxAda will be used within the embedded
sector, so it may not be that feasible, but I was wondering more about
the fact that there are a lot of calls in wxWidgets and that if every
call was blocking, it may end up being particularly slooow when
multiple tasks start to use the objects concurrently.

> Could you provide the locking as an option at compile time? I.e. have 2
> packages that providing locking but one is "begin null end;" (or "is null;"
> for Ada2005, yes?) for everything.

That would be a big job as there is no preprocessor for Ada (only GNAT
- and this lib is to be portable).

Yeah, there will be an Ada 2005 version after the Ada 95 version.

Luke.

.



Relevant Pages

  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... so that at compile time you can guarentee never to ... Also, if you pass a parameter as a const reference, ... > you will not be able to mutate the object the parameter references. ... Yes but Ada does not require the programmer to define what parameter ...
    (comp.lang.ada)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... so that at compile time you can guarentee never to ... Also, if you pass a parameter as a const reference, ... > you will not be able to mutate the object the parameter references. ... Yes but Ada does not require the programmer to define what parameter ...
    (comp.lang.cpp)
  • Re: Translating an embedded C algorithm
    ... "The Ada run time system on the other hand is for the most part not even a run time system. ... Most files in the RTS are only needed at compile time. ... I don't know how an Ada compiler targeted for microcontrollers would make the internal representation of this type, but if it employs more than a 16 bit word, I would rather stick to the other implementation elsethread. ...
    (comp.lang.ada)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... it can be true at compile time with ... that better solutions can be implemented as I'm not either a C++ or Ada ... -- Pragma Suppress(Range_Check); ...
    (comp.lang.ada)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... it can be true at compile time with ... that better solutions can be implemented as I'm not either a C++ or Ada ... -- Pragma Suppress(Range_Check); ...
    (comp.lang.cpp)