Commit Graph

12 Commits

Author SHA1 Message Date
Christina Sander 3dc92bde5f
MOD: Replaces the queues connectionQueue_ and disableSchedulingQueue with a command queue where different commands can be queued for later processing. 2022-09-22 18:06:51 +02:00
Christina Sander 01b2d3cd0d
ADD: Adds class comments for Event, Manager and Participant. 2022-09-22 13:39:33 +02:00
Christina Sander d268273e3c
FIX: fixes deadlock bug of class function to disable scheduling
When calling _diableScheduling of the participant to enable the
own participant for scheduling by the manager the process runned in a
deadlock.

Summary:
1. manager locks mutex mutexSchedulingParticipants_
2. calls schedule class function of participants in the
   schedulingParticipants_ list
3. there the _disableScheduling function is called by the participant
4. which calls the unschedule function of the manager
5. manager tries to lock mutexSchedulingParticipants_ which is already
   locked

Solution:
- this commit adds the following elements to the Manager class:
	1. disableScheduleQueue_
	2. mutexDisableScheduleQueue_
	3. processDisableScheduling_() ( like processConnections() )
- this commit changes the following functions of Manager class:
	1. unschedule( ... ) -> now adds given participant to
	   disableScheduleQueue
	2. scheduleProcess_() -> now also calls the class function
	   processDisableSchedulung_() after processConections_()
2022-08-30 15:12:51 +02:00
Christina Sander 5c2fc37748
ADD: Adds comment to processConnections_ class function of the manager 2022-08-30 15:12:31 +02:00
Christina Sander 1ed68d302d
FIX: fixes spelling error in variablename participants_ (list of connected participants in the manager). 2022-08-30 12:43:42 +02:00
Dominik Meyer 92975e8349
FIX: fixed deadlock when participant connects another one 2022-02-19 16:06:49 +01:00
Dominik Meyer b79a67b596
ADD: assign a unique id to each connecting participant 2022-02-19 12:26:19 +01:00
Dominik Meyer 89f13445ba
ADD: protect eventMap with mutex 2022-02-18 22:49:09 +01:00
Dominik Meyer e7d90d0c87
ADD: added method to not schedule a participant anymore 2022-02-18 22:02:31 +01:00
Dominik Meyer a0d174df08
ADD: add participant to a list on connect 2021-08-16 20:20:01 +02:00
Dominik Meyer 9a0efd0b62
ADD: improved calling interfacce 2021-08-04 12:04:30 +02:00
Dominik Meyer 2c1b0f4c28
ADD: first version 2021-08-04 09:53:57 +02:00