fix: do not print message exit eating
This commit is contained in:
parent
41bd1149d8
commit
7e7538aa40
7
philo.c
7
philo.c
@ -19,6 +19,13 @@ bool check(t_philo *philo, t_data *data)
|
||||
{
|
||||
bool stop;
|
||||
|
||||
if (get_min_meal(data) == data->nb_meals)
|
||||
{
|
||||
pthread_mutex_lock(&philo->stop_mutex);
|
||||
philo->stop = 1;
|
||||
pthread_mutex_unlock(&philo->stop_mutex);
|
||||
return (1);
|
||||
}
|
||||
pthread_mutex_lock(&data->stop_mutex);
|
||||
stop = data->stop;
|
||||
pthread_mutex_unlock(&data->stop_mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user