Hi,

One more question if anyone can help.
Using ports as suggested gives me a stream which blocks until further data is available, but is their a way to 'pop' values off the stream? Ideally I want to read around 100 items from the stream, removing them as I go. The amount of data to be read during one run of the program will be very large and the stream will obviously grow as data is received. However, the program is intended to loop continuously and therefore I need to have some way of discarding processed stream items.

Any suggestions?

Regards

Mark

Raphael Collet wrote:
Dear Mark,

Why don't you use a port? This abstraction is designed for that kind of usage. Make the first thread send every decoded tuple on the port, and the other thread just reads the stream of tuples. The second thread will naturally block when no data is available.



_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to