Prev Previous Post   Next Post Next
Old 06-10-2019, 04:34 PM   #1
Human being with feelings
tack's Avatar
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 662
Default JSFX, _global, and concurrency

Suppose I have a JSFX that does this:

local_variable = += 1
These kinds of get-and-set operations are red flags from a concurrency perspective, but I don't understand the thread safety aspects of this code in the context of a JSFX, or even if thread safety is relevant.

If all JSFX are executed from a single thread with no preemption possible, as I believe is the case, then this code is safe. Otherwise, I'm hoping someone can explain to me if it's possible to make it safe (mutexes and the like).

tack is online now   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 04:46 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.