A simple way to create a thread pool

Hi, using this code we can run this script:
```
import std.io.*;


var nthreads = 10;
var cthreads = 0;

function f() {
	var i = 10, id;

	critical {
		++cthreads;	
		id = cthreads;
	}

	while(i--) {
		critical {
			println(id);
		}
	}
}

spawn treta[nthreads] {
	f();
}

wait treta;
```