Skip to content

Race condition in multithread.c example #19524

@korepanovnd-Sochi

Description

@korepanovnd-Sochi

Specify which documentation you found a problem with

Example multithread.c

The problem

Example multithread.c has a race condition. Pointer to integer 'i' variable is passed to thread function.
Immediately after threads creation, variable 'i' assigned a new value. As result, from 2 to 3 threads get equal 'i' values, and getting same urls

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions