You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the STD the following files: pool.c3, thread.c3 are missing important functions implementations that also involves their underlying libraries such as thread_win32.c3, specifically:
The Mutex class in thread.c3 does not check if a thread is trying to acquire it twice, deadlocking it.
Are there any particular reasons for this choice? Since a list or even a queue would be much better.
The following test function is acquiring and releasing the work_done mutex using two different threads, the main thread and the one taken from the pool, wich is effectively wrong and worked only due to the lack of checks of the mutex implementation.
In this issue I mainly talked about some bugs in the Windows implementation, not sure about the POSIX one. In case I find out something new, I will add it here, since I have not yet delved into the other mutex types.
The text was updated successfully, but these errors were encountered:
DanyDollaro
changed the title
Threads and mutexes libreries auditing
Threads and mutexes libraries auditing
Sep 21, 2024
DanyDollaro
changed the title
Threads and mutexes libraries auditing
Threads and mutexes libraries bugs
Sep 21, 2024
In the STD the following files:
pool.c3
,thread.c3
are missing important functions implementations that also involves their underlying libraries such asthread_win32.c3
, specifically:Mutex
class inthread.c3
does not check if a thread is trying to acquire it twice, deadlocking it.In this situation it would be preferable to return a
fault
.Mutex
class lack of release controlssince this code prints the following
ThreadPool
implementation make use of a fixed array to store the functions to be calledAre there any particular reasons for this choice? Since a list or even a queue would be much better.
work_done
mutex using two different threads, the main thread and the one taken from the pool, wich is effectively wrong and worked only due to the lack of checks of the mutex implementation.In this issue I mainly talked about some bugs in the Windows implementation, not sure about the POSIX one. In case I find out something new, I will add it here, since I have not yet delved into the other mutex types.
The text was updated successfully, but these errors were encountered: