Hey,

Am 28.08.2013 um 10:01 schrieb OmarShariffDontLikeIt 
<[email protected]>:
> 
> At the moment I have a single connection. As each job comes in I keep a track 
> of it. If there are currently active jobs being processed, I switch to 
> reserve-with-timeout, allowing the thread to process results. If there are no 
> active jobs being processed, then the connection switches to traditional 
> blocking reserve. The problem is that the blocking reserve obviously blocks 
> the active thread.
> 
> Mmmmm. I may have to sack off the blocking reserve and just go with 
> reserve-with-timeout(0) and poll periodically. Not ideal, but I can't see a 
> way around this at the moment.

You could also use a non-blocking connection which let your thread reading data 
from the stream as soon as the thread is ready again to read from it.

Best,

Sebastian

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to