Safe Thread Queue
Hello, I am new at this forum and want to thank you for this opportunity.
I need to code a thread safe queue in C++ , BUT asked me not to use existing class libraries for this task.
It has something like wait and notify that can I use ?
Anyone can help me ? it is possible ?
Welcome to the boards.
Yes, it's possible. Why can't you use existing class libraries? What OS and compiler?
It was a friend of mine, she is a professor. I don't know why can't use libraries, sorry.
I know a little bit of C++, but don't know how to do it without libraries.
I thank you any help
Are you sure you're up for such a challenge then?
Sorry, it is for Windows and gcc
Start by implementing a Queue abstract data type. Once you post the code for that, then we'll look at how to make it thread safe.