.
D 2009-08-19T21:07:19
J icomment Zoran,\sthanks\sfor\syour\sreply.\sI\sthought\sit\swould\sbe\strivial\sto\sdo\sand\shandy\sto\shave.\nI'm\sworking\son\sa\svisualization\sproblem\sthat\scan\sbe\sbroken\sup\sinto\sabout\s50\sequal\schunks.\sThe\stotal\sjobs\stake\sabout\s4\shours\son\sa\sslow\smachine\sand\sabout\s20\sminutes\son\san\s8-core\smachine\susing\syour\sthread\spackage.\sI\skeep\sa\sprogress\sbar\sgoing\sso\sthat\sI\scan\sreport\s"n\sof\s50\scompleted".\sThe\snatural\sand\seasy\sway\sof\sdoing\sthis\sis\sto\sdo\s50\sposts\s(setup\stime\sis\squick\sfor\smy\sproblem)\sand\sthen\ssit\sin\sa\swait\sloop,\sget\sthe\soutput\sof\seach\schuck,\sprint\ssome\smessages,\sand\supdate\sthe\sprogress\sbar.\sThis\sdoesn't\sreally\swork\ssince\sbefore\sthe\spost\sloop\scan\scomplete\sthe\stasks\sgrab\sall\sthe\scores.\sAs\seach\stask\sfinishes,\sits\soutput\sget\squeued,\ssince\sI\shave\snot\sentered\sthe\swait\sloop\syet.\sEventually\severything\scompletes;\showever,\sthe\sprogress\sis\snot\sreported\sin\sa\ssmooth\smanner.\s\sI\shave\ssolved\smy\sproblem\swith\screating\sa\squeue\sand\sposting\sfrom\sthat\suntil\sthe\spool\sis\sfilled\sand\swhen\sa\stask\scompletes\sposting\sanother\sjob.\sThis\sis\sjust\sa\spain.\sIt\swould\sbe\sa\ssimilar\scase\sfor\smutexes.\s\sYou\send\sup\smanaging\sthe\sthreads;\sinstead\sof\sletting\sthe\sthreadpool\sdo\sit\sfor\syou.\sThanks.\n\nBarry\n
J login hathawa
J mimetype text/plain
J username hathawa
K 2835615fffffffffffffffffffffffffffffffff
U hathawa
Z 5cbcff636a9242a347d6f1f1a594adfc