public synchronized String requestBlock ( String name ) { if ( blocks . isEmpty ( ) ) { return "exit" ; } remainingBlocks . decrementAndGet ( ) ; return blocks . poll ( ) . createResponse ( ) ; }
Returns a description a block of work or exit if no more blocks exist