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 ?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||