Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Race conditions and atomic read and writes
No permission to create posts
June 26, 2016
7:18 pm
Avatar
hoegge
Member
Members
Forum Posts: 11
Member Since:
June 12, 2016
sp_UserOfflineSmall Offline

Hi

Are there any mechanisms in RackAFX and the resulting plugins that prevents issues with inconstancy in reading and writing parameters from gui to audio processing function? I suppose that the GUI part of RackAFX does not run in same thread or priority as the audio processing function?mand in that case the GUI and variable cooking functions could be interrupted by the audio processing function which then might read corrupted member variables or? Is all the prevented some way?

Kr
Hoegge

June 26, 2016
10:05 pm
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

There was, at one time, the use of Events to synchronize these threads (and some of that code is leftover in the FX book which has caused some confusion), but I was advised not to use them because of the thread priority issues between the runtime code and the GUI code where this is ill-advised. You can certainly add that back in, though to date, no race conditions have occurred with the sample code for the book projects and no users have reported any issues.

For the ported projects, there are no issues due to their own internal mechanisms for handling this. This also includes using the RAFX-as-VST2/3 paradigm where the GUI changes are protected so updates are always handled before processing. It is only within RackAFX where this could be an issue, but since it doesn't support automation, the conditions are rare.

Also, I write the update() functions which get called as a result of userInterfaceChange() in a way that copies variables, so there is a bit of protection within the code itself.

I am working on an update for RackAFX for this protection mechanism to be built-in since it is only a possibility within RackAFX itself and not the ported projects.

- Will

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online: W Pirkle
1 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Derek: 41

Peter: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 478

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 29

Topics: 479

Posts: 1870

Newest Members:

certvalue111, sobhana s, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 140

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 140