No subject
Wed Apr 23 09:37:23 CEST 2008
but in reality better task units should be 10 or more blocks on the same
row. Not very important as this could be a tuned value anyway.
You can have a look at some thread pool code in c and c++:
- http://ed.gomez.free.fr/vrac/threadpool.c /h
- http://ed.gomez.free.fr/vrac/ThreadPool.cpp /hpp
That implementation lacks a "global join" waiting for all consumers to
finish. The flush function just flushes the queue till it has no tasks
left but leaves before the consumers finished. It is left as an exercise
of 5 min to the reader :-)
PS: the simple pthreads defines in XviD aren't good enough
for these thread pools to work on Win32, you have to use
Pthread-win32 for condition variables.
--
Edouard Gomez
More information about the XviD-devel
mailing list