Warning, /frameworks/threadweaver/examples/ThumbNailer.in.md is written in an unsupported language. File is not indexed.
0001 ## Working title: Everything in moderation (and decorated) 0002 0003 Let's put the features that have been described so far and a few more 0004 that as of yet haven't been mentioned, and create a comprehensive 0005 example program. The example program calculates thumbnails for 0006 images. It will take a number of image files and, in separate steps 0007 implemented as individual jobs, load them from disk, convert them from 0008 raw data to QImages, scale the images to thumbnails, and finally save 0009 them to disk. This problem may not be most imaginative use of concurrent 0010 programming techniques, but it does demonstrate a number of practical 0011 problems. For example, the operations for each single image contain 0012 elements that are file system I/O bound and elements that are CPU 0013 bound. For large numbers of images, it has to deal with a trade-off of 0014 memory usage and CPU utlilization. Less obvious, there are also 0015 expectations on the order of execution of the jobs, so that the 0016 interface provides the user with visible feedback of the progress of 0017 the operations. An application of this kind also should provide 0018 features of load management and reduce it's own generated system load 0019 if the system is "stressed" by other processes. A web server 0020 implementation or a video coding program will have to solve similar 0021 issues to provide optimal throughput without overloading the system. 0022 0023