Skip to content

Commit feb91d6

Browse files
authored
Merge pull request #28 from Debosmit-Neogi/master
Improved docs
2 parents 098828b + 592bf8a commit feb91d6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ __Disclaimer: Please Do not use this project in a professional environment. It m
2222

2323
# Build instructions:
2424

25-
This project has been developed using Netbeans and Linux but it should work on Windows, MAC OS and Linux. It can be easily build using CMake and different generators. The following code can be used to generate the VS 2017 project files:
25+
This project has been developed using Netbeans and Linux but it should work on Windows, MAC OS and Linux. It can be easily build using CMake and different other generators. The following code can be used to generate the VS 2017 project files:
2626

2727
```c
2828
// VS 2017
@@ -34,7 +34,7 @@ cmake .. "Visual Studio 15 2017 Win64"
3434

3535
Then, from VS you can edit and execute the project. Make sure that __main project is set up as the startup project__
3636

37-
If you are using Linux, you need to change the generator (use the default) and execute an extra operations to actually make executable:
37+
If you are using Linux, you need to change the generator (use the default) and execute an extra operation to actually make it executable:
3838

3939
```c
4040
// Linux
@@ -47,7 +47,7 @@ make
4747

4848
# Thread pool
4949

50-
The way that I understand things better is with images. So, lets take a look at the image of thread pool given by wikipedia:
50+
The way that I understand things better is with images. So, let's take a look at the image of thread pool given by Wikipedia:
5151

5252
<p align="center"> <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Thread_pool.svg/580px-Thread_pool.svg.png"> </p>
5353

@@ -60,7 +60,7 @@ As you can see, we have three important elements here:
6060

6161
We use a queue to store the work because it's the more sensible data structure. We want the work to be **started** in the same order that we sent it. However, this queue is a little bit **special**. As I said in the previous section, threads are continuously (well, not really, but let's assume that they are) querying the queue to ask for work. When there's work available, threads take the work from the queue and do it. What would happen if two threads try to take the same work at the same time? Well, the program would crash.
6262

63-
To avoid this kind of problems, I implemented a wrapper over the standard C++ Queue that uses mutex to restrict the concurrent access. Let's see a small sample of the SafeQueue class:
63+
To avoid these kinds of problems, I implemented a wrapper over the standard C++ Queue that uses mutex to restrict the concurrent access. Let's see a small sample of the SafeQueue class:
6464

6565
```c
6666
void enqueue(T& t) {

0 commit comments

Comments
 (0)