Solution of producer-consumer problem with variable size of produced/consumed data, using active object pattern