Informations

Auteur(s) Erik-Jan Lingen, Matthias Möller
Date limite Pas de date limite
Limite de soumission Pas de limite

Se connecter

[Threads] Solution 2 : Rank

This material is part of the course Practical Introduction to Parallel Programming and meant for educational purposes only.


Task

Implement a program in which the main threads spawns a number of child threads.

The main thread should pass an integer rank - ranging from zero to the number of threads minus one - to each child thread.

Each child thread should print its rank.


Question 1: Rank
Question 2: Command Line Argument

Specify the command line arguments that should be passed to your program when it is run. Arguments must be given in quotes and separated by commas. Leave this filed empty if you do not want to specify command line arguments.

Example: "1","int","arg=2" is interpreted as three arguments 1, int, and arg=2.