Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Race Condition with Gateway tasks

Avatar

Avatar
Validate 1
Level 5
yodadobe
Level 5

Likes

12 likes

Total Posts

298 posts

Correct Reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 5
yodadobe
Level 5

Likes

12 likes

Total Posts

298 posts

Correct Reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
yodadobe
Level 5

12-03-2009

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?