Detach and assert on thread | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Detach and assert on thread

Refer below code: https://code.sololearn.com/c26A4A14A24A When we detach the thread object, it generates default thread ID. So, code will complete execution as assert statement is ok. This works ok and I believe my understanding is true. Now change line related to detach to t1.join(); and it still does not give assert abort. Why so?

16th Apr 2021, 7:09 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
1 Answer
0
If I am trying to get id first and then attach or join, it gets aborted due to timeout in both scenarios
16th Apr 2021, 10:03 AM
Ketan Lalcheta
Ketan Lalcheta - avatar