Details

    • Type: Bug
    • Status: Deployed
    • Priority: New
    • Resolution: Fixed
    • Affects Version/s: 4.5.2.018, 5.0.0.138
    • Fix Version/s: 5.0.0.162
    • Labels:
      None

      Description

      If you create a singleton of a CFC and in that CFC create a thread without specifying the name (which is optional) and then create another thread without specifying the name it will error with the following message:

      could not create a thread with the name [thread0qfrpr5u2ilxp0eo5hhf]. name must be unique within a request
      

      Example code is:

      test.cfm

      <cfscript>
          testObj = new test();
          testObj.testFunc(5000);
          testObj.testFunc(2000);
          echo("done");
      </cfscript>
      

      test.cfc

      component output = 'false' accessors = 'true' {
          public any function init()
          {
              return this;
          }
          public any function testFunc(numeric testVal) {
              thread action="run" {
                  sleep(testVal);
              }
              return true;
          }
      }
      

      The simple workaround for this is to specify a unique name with each call of the function, e.g.

      thread action="run" name="#createUUID()#" {...
      

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              andrew Andrew Dixon
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: