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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Race Condition with Gateway tasks

Level 6
Level 6
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?
0 Replies