Project

General

Profile

User story #627

Merge RealTimeThreadSyncDataSource changes (from FAT tools)

Added by André Neto over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
03.09.2020
Due date:
% Done:

0%

Estimated time:
Git branch (link):
Git merge to develop (link):
SVN commit (link/?p=rev):

Description

Allow to phase the unblocking of threads (using the Trigger parameter).
Decide if to use another name to the parameters (e.g. Phase).

History

#1 Updated by André Neto about 4 years ago

  • Status changed from New to Code: Impl

#2 Updated by André Neto about 4 years ago

  • Assignee set to Giuseppe Avon

#3 Updated by Giuseppe Avon about 4 years ago

Changes are focused on the WaitForNext parameter introduction. This parameter influences the usage of the synchronisation primitives by introducing the case where .Post() calls are lost by a a consuming thread unable to keep the pace. Instead of finding an already "posted" semaphore, this causes the reset of it before waiting.
The introduction impacts both the DataSource and the related Broker.

Aside from this, referring to commit 39f85b22[54378967ccb69f4329d9739c45d5f49c], things were found which should be brought to attention:
- The "trigger" variable, assigned on line 123 by means of "GetFunctionSignalTrigger" is immediately overwritten by the consecutive assignment on line 125 with the value from numberOfSamples. The whole 122:127 block should be examined;
- Even if the "trigger" and "numberOfSamples" variable should match, they are handled as if they were different in lines 181-186;
- Semaphore is not thread safe, Post()/Wait()/ResetWait() on lines 182-198-202-204 should be handled in critical sections;

#4 Updated by André Neto about 4 years ago

  • Assignee deleted (Giuseppe Avon)
  • Status changed from Code: Impl to Closed

Comments by G. Avon to be addressed in the future outside the scope of the FAT tools. See #779.

Also available in: Atom PDF