| { | |
| "task_id": "race_condition_hard_2", | |
| "task_name": "Race Condition", | |
| "description": "Find the race condition in the thread-safe counter", | |
| "difficulty": "hard", | |
| "code_diff": "class Counter:\n def __init__(self):\n self.count = 0\n \n def increment(self):\n current = self.count\n self.count = current + 1\n return self.count", | |
| "expected_issues": [ | |
| { | |
| "line": 6, | |
| "type": "race_condition", | |
| "severity": "high", | |
| "description": "Non-atomic increment operation" | |
| } | |
| ] | |
| } |