What is the problem
Basically this pattern solve the problem of a buffer, in which one or more Producer can push a data and one or more Consumer can pull a data. There are a couple of problems that can arise: the first is catch to ’race condition’, indeed since to the buffer can access more productors and consumers at the same time, can arise problems of inconsistency data. The second problem is catch to ’deadlock’,
Leggi tutto... (http://blog.intelly-net.com/java/design-pattern/concurrency-pattern-producer-consumer.html)
↧