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

Re: [Cheetahtemplate-discuss] More on thread safety

Expand Messages
  • Tavis Rudd
    Does anyone really need or want this? I really don t a need to do anything about this. If someone wants to use a template in multiple threads simultaneously
    Message 1 of 4 , Mar 30, 2002
    • 0 Attachment
      Does anyone really need or want this?

      I really don't a need to do anything about this. If someone wants to
      use a template in multiple threads simultaneously all they need to do is:
      - not make any use of the .request, .response methods, etc. that we
      map in the awake() method. I'm assuming that they won't be using
      these with the containment approach anyway.
      - not use #set global
      - not muck around with the searchlist. Instead the can pass their
      variable content in as arguments to a method of the Cheetah generated
      method. The methods are re-entrant.

      Tavis

      On Saturday 30 March 2002 14:54, Mike Orr wrote:
      > I added to the TODO to implement that mutex I talked about earlier,
      > to make filling templates thread safe. However, I realized this
      > will not 100% solve the problem. If two threads share a template
      > object, they will also share the search list and the template's
      > 'self'. Thus, if one thread is filling and the other one
      > simultaneously sets searchList variables and Template 'self'
      > attributes, those values will leak into the first thread.
      >
      > The only way I can think of to prevent this is to expose a second
      > mutex and allow the threads to explicitly lock it before doing
      > their variables + filling thing. But that could affect
      > performance, since one thread may take an arbitrary long time to
      > leisurly set its variables, or could potentially hang the template.
      >
      > Ideas? We either need to make template instances thread safe, or
      > make the benefits of Cheetah caching available across template
      > instances.

      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Tavis Rudd
      Hi, I ve just released 0.9.12. There are no changes to the code since beta 2, but Mike has done some more work on the Users Guide.
      Message 2 of 4 , Apr 3, 2002
      • 0 Attachment
        Hi,
        I've just released 0.9.12. There are no changes to the code since
        beta 2, but Mike has done some more work on the Users' Guide.
        http://prdownloads.sourceforge.net/cheetahtemplate/Cheetah-0.9.12.tar.gz
        Tavis

        _______________________________________________
        Cheetahtemplate-discuss mailing list
        Cheetahtemplate-discuss@...
        https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      • Mike Orr
        ... The documentation changes are some updates to chapters 1 & 2 (introduction, getting started). I also put dummy text in the Developers Guide and
        Message 3 of 4 , Apr 3, 2002
        • 0 Attachment
          On Wed, Apr 03, 2002 at 12:44:29AM -0800, Tavis Rudd wrote:
          > Hi,
          > I've just released 0.9.12. There are no changes to the code since
          > beta 2, but Mike has done some more work on the Users' Guide.
          > http://prdownloads.sourceforge.net/cheetahtemplate/Cheetah-0.9.12.tar.gz

          The documentation changes are some updates to chapters 1 & 2
          (introduction, getting started). I also put dummy text in the
          Developers' Guide and Beginners' Guide explaining what our goals for
          these manuals are.

          Currently I'm working on chapter 3 (how it works) which is an overview
          of the Template object. This is one of the most dense chapters
          info-wise, so it will take some time to update. Then I'll be going
          through each chapter in order. Then (after all that) I'll be adding
          some examples.

          I guess this tarball is the first to include the updates to the Webware
          chapter I completed a week or so ago.

          What's this prdownloads site?

          --
          -Mike (Iron) Orr, iron@... (if mail problems: mso@...)
          http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol

          _______________________________________________
          Cheetahtemplate-discuss mailing list
          Cheetahtemplate-discuss@...
          https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        Your message has been successfully submitted and would be delivered to recipients shortly.