holger at wizards.de
Mon Jan 8 08:48:44 EST 2007
Peter Kovacs wrote:
> I am intrigued by your final remark, however. You say: "if you produce
> work more quickly than you consume it over an extended period of time,
> you will eventually run out of something, somewhere, unless you
> throttle." My purpose with having the producer block when a limited
> number of threads are fully utilized is just to suspend producing. Oh
Ah, OK - sorry for the confusion. In that case you do throttle so it
should work. However you probably still don't really know how long to wait
up front, unless the calculations have an at least somewhat predictable
time to run.
> I guess I see: do you mean by "throttling" that there is an (not
> necessarily justified) overhead with handling rejected tasks (and task
> rejection itself)?
No, that is probably insignificant.
More information about the Concurrency-interest