Loading ...
Sorry, an error occurred while loading the content.

New thread-safe SE release!

Expand Messages
  • Miguel Oliveira e Silva
    There is a new [alpha2] version of thread-safe SE. It s mainly a bug-fix release, but I ve also included an attempt (that seems to work) to implement
    Message 1 of 1 , Oct 2, 2000
    • 0 Attachment
      There is a new [alpha2] version of thread-safe SE.

      It's mainly a bug-fix release, but I've also included an attempt
      (that seems to work) to implement global-once functionality
      (based on ISE's ThreadEiffel library). The overhead involved
      in global-once usage is small (only needs an extra
      once-per-thread "stub" routine), but it's limited to
      argumentless routines and to reference types global-once
      functions. There is an example program with this new functionality.

      The last version was full of [quite trivial :(] errors
      (for instance, it didn't work well in optimization
      modes other than 'debug_check', which was the one I
      used). Hopefully that's solved.

      Feature 'to_external' of STRING is *not* thread-safe
      (because it changes for a short while 'count' value,
      which sometimes [welcome to the world of threads ;)]
      raises an ensure failure when dealing with constant [shared]
      strings). As a "workaround" I've changed STRING class,
      removing the export to {STRING} of feature 'storage',
      allowing string clients to deal directly with it instead
      of to_external (Yes, this is a very bad, and ugly, "solution".
      A real solution requires some changes to STRING's
      implementation of 'to_external').

      I have decided to re-implement thread-safe SE code generation
      using thread-specific data (avoiding, the actual shared thread
      structures) [following Marcio Marchini suggestion].
      This will improve the efficiency of the package. The only
      [small] problem with this approach relates to once-per-thread
      implementation because there is a limit of 128 'keys' (which
      is the way pthreads accesses thread specific data). If not for
      this limitation [unacceptable to use in SE, because it would be
      absurd to limit the number of once routines], the changes
      would have been quite simple (now, it will take a little
      bit longer).

      There is a new file HISTORY where you can track the internal
      and external evolution of the package.

      -miguel

      --
      Miguel Oliveira e Silva email: mos@...
      Dep. de Electrónica e Telecomunicações / IEETA
      Universidade de Aveiro - PORTUGAL
      phone: +351 234 370375 fax: +351 234 370545
      www: http://www.ieeta.pt/~mos
    Your message has been successfully submitted and would be delivered to recipients shortly.