Please consider registering

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
Forum Posts: 11
Member Since:
June 12, 2016
sp_UserOfflineSmall Offline


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?


June 26, 2016
10:05 pm
W Pirkle
Forum Posts: 259
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

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: 55

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Peter: 41

Frodson: 40

clau_ste: 39

Gwen: 32

JimmyM: 30

TheSmile: 28

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 525

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 31

Topics: 550

Posts: 2158

Newest Members:

LamebrainEddy, SteveThackery, rawbirdtoe, Bill, hill william, NAUN_SONAR, sufy, Diane, Richard, drvenkman

Moderators: W Pirkle: 259

Administrators: Tom: 67, JD Young: 80, Will Pirkle: 0, W Pirkle: 259