Break the loop when you have seen enough tuples. Use the semaphores to return control to reader thread.
Break the loop when you have seen enough tuples.
Use the semaphores to return control to reader thread.

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb