I have a programm that process files one by one,now i want to change it into a multithreaded programm so it will process more files in the same time.
it will be a gui program,so the main process will control the gui , buttons and the log window.
thoughts & problems
1. all files that are in procces right now , stored in 1 array.
2. avoid sametime acces of that array,log is no problem because of system and perl buffering on outputs.
3. several exit modes: stop,abort , exit , immediate exit.
stop = stop processing of new files but finish all in progress files
abort = same as stop but interrupt in progress files and roll back all changes and move in progress files back to need_to_process
exit = same like stop but quit the program
immediate exit = same like abort but quit program
4. logging, star and end of processing shoud be written to logfile,and problems and oks also.
there will be and log parser that checks if every file has a start and end in log if not delete file changes from db and move problem file back to need_to_process.
only will be uses on first start of program or manually after critical aborts(system off, or something else)
5. the logwindow shoud scroll down so it always show the latest infos.
6. the programm will run forever. so it need to be coded nicly in var handling
7. if they are no files to process the programm will wait 5 mins and then look again for files.
8. maximum threads shoud be 6 including main thread so 5 workers.
thats what is in my mind so far, any suggestions or points that i shoud think about or to avoid ?
kd
ultibuzz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |