linux-sysprog · beginner · ~15 min
Catch the resource-leak mistake.
Implement int forgotten_joins(int created, int joined) returning how many joinable threads were never joined (created - joined, floored at 0).
int forgotten_joins(int created, int joined) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.