|
-
How to create a blocking call for our class?
Hi,
I am trying to create a queue class, with a blocking call for read.
using a read() method or an overloaded >> extraction operator.
I would like my class to behave similar to cin, where it will
wait until there is something in the vector.
I am looking for a method that does not use an additional thread
for polling the vector (queue).
The ones populating this vector (sending signals to this class)
expects nothing more than a lightweight operation on this class
(like pushing a message to the vector)
In short, how to implement a blocking method, which will wait for
data and return with the data, until it encounters an EOF character
(or a terminating pattern string in the vector)
I tried looking out for tying streams to gether.. but nothing worked.
Any help would be appreciated.
Thanks in advance.
Thanks and Regards,
Jose Panakkel
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks