0 Replies Latest reply on Mar 12, 2009 11:32 AM by Steve Bishop

    Race Condition with Gateway tasks

    Steve Bishop Level 2
      I am doing an assign to user within a gateway. The process loops to spin off a task to an unlimited number of users. After the user submits, some data is processed. A count is kept of the number of submitted users. When that hits the total number of users, an event is thrown and caught in the main map to continue. The problem is that if two users hit submit within a few seconds of each other, both threads increment from the same value. So if there are 5 users, 4th and 5th submit at the same time, the counter goes from 3 to 4 in both threads. 5 is never hit and the process is basically hung.

      Anyone have an idea for addressing this?