From 3726c9a3b00f50b52919904946da7c309dfe8ac0 Mon Sep 17 00:00:00 2001 From: Zewasik <89100777+Zewasik@users.noreply.github.com> Date: Wed, 8 Jun 2022 15:26:48 +0300 Subject: [PATCH] update wrong instruction --- subjects/drop_the_thread/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/drop_the_thread/README.md b/subjects/drop_the_thread/README.md index b5664078..d78c1c6d 100644 --- a/subjects/drop_the_thread/README.md +++ b/subjects/drop_the_thread/README.md @@ -24,7 +24,7 @@ You'll need to also add the following associated functions to the structures: - `new_worker`: that returns a tuple with the `pid` and a new `Thread`. This function must receive a `String` representing the `cmd`. - `is_dropped`: that receives a `pid` and returns a `bool` that indicates the state of the thread. - `track_worker`: which returns a `usize` representing the length of the `states` vector. (The index of the next new thread). - - `add_drop`: which is **called by the `Drop` trait**. It will receive a `pid` that will be used to change the state of the thread. If the state of that thread is `true` then it will panic with the message `"Cannot drop X, because its already dropped"`, where `X` represents the `pid`). Otherwise it should change the state to `true` and increment the `drops` field by 1. + - `add_drop`: which is **called by the `Drop` trait**. It will receive a `pid` that will be used to change the state of the thread. If the state of that thread is `true` then it will panic with the message `"X is already dropped"`, where `X` represents the `pid`). Otherwise it should change the state to `true` and increment the `drops` field by 1. - `Thread`: - `new_thread`: that initializes a new thread.