From 5e08462ce5f82c142dce5368b0ed3bdc36dbca13 Mon Sep 17 00:00:00 2001 From: Debosmit Neogi <59002072+Debosmit-Neogi@users.noreply.github.com> Date: Wed, 30 Sep 2020 18:58:42 +0530 Subject: [PATCH 1/2] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b3d203a..b056286 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ __Disclaimer: Do not use this project in a professional environment. It may cont # Build instructions -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: +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: ```c // VS 2017 @@ -47,7 +47,7 @@ make # Thread pool -The way that I understand things better is with images. So, lets take a look at the image of thread pool given by wikipedia: +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:
@@ -60,7 +60,7 @@ As you can see, we have three important elements here: 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. -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: +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: ```c void enqueue(T& t) { From 729c0864f484e7930749c372f7fa29a55826a00a Mon Sep 17 00:00:00 2001 From: Debosmit Neogi <59002072+Debosmit-Neogi@users.noreply.github.com> Date: Thu, 1 Oct 2020 09:50:37 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b056286..fa80279 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ cmake .. "Visual Studio 15 2017 Win64" Then, from VS you can edit and execute the project. Make sure that __main project is set up as the startup project__ -If you are using Linux, you need to change the generator (use the default) and execute an extra operation to actually make the executable: +If you are using Linux, you need to change the generator (use the default) and execute an extra operation to actually make it executable: ```c // Linux @@ -47,7 +47,7 @@ make # Thread pool -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: +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: