indexing description: "consumer thread" library: "elogger" copyright: "Copyright (c) 2006, AXA Rosenberg, and others (see copyright.txt)" author: "Ulrich Weiss, and others" license: "Eiffel Forum License v2 (see forum.txt)" date: "$Date: $" revision: "$Revision: $" archive: "$Archive: $" class T_ELOG_QUEUE_CONSUMER inherit THREAD creation make feature -- Initialization make (buf: ELOG_CONCURRENT_LINKED_QUEUE_CV [STRING]; id: INTEGER) is -- Initialize parameters, and launch thread. do buffer := buf name := id end feature -- Access buffer: ELOG_CONCURRENT_LINKED_QUEUE_CV [STRING] -- queue name: INTEGER -- name of the consumer feature {NONE} -- Implementation execute is local item: STRING do from until buffer.is_closed loop item := buffer.get io.put_string (item.out+" (count: "+buffer.count.out+") id = "+name.out+"%N") -- yield end end end