[fpc-pascal] getting started with threads

Vincent Snijders vsnijders at vodafonevast.nl
Fri Sep 18 10:04:08 CEST 2009


David Emerson schreef:
> I am getting started with threads (linux/cthreads) and I'm very happy so 
> far, but unsure of the best way to tackle my situation.
> 
> I have a program that needs to perform about 10,000 independent tasks, 
> which usually involve waiting for I/O; thus it makes sense to use 
> several threads so that some waiting can be done in parallel. I thought 
> I'd try it with 10 threads.

Maybe you can use MTProcs unit: http://wiki.lazarus.freepascal.org/Parallel_procedures

You don't need to worry about assigning tasks anymore.

Vincent



More information about the fpc-pascal mailing list