Yes, I’ve seen it happen. 4D language is multi-threaded already - it’s 
cooperative instead of pre-emptive prior to v16.  A method looping through an 
interprocess array can easily be paused while another method updates that same 
array.

------------------------------------------------
Richard Wright
DataDomain
[email protected]
------------------------------------------------

> Date: Mon, 31 Oct 2016 22:43:48 -0700
> From: Kirk Brooks <[email protected]>
> 
> 
> David,
> Great points - but, respectfully, does it ever actually happen? Can you
> write an example db that does this?
> 
> And bear in mind I'm talking about conditions on a client - not the server.
> And I'm not talking about situations where an external client might be
> attempting to set variables either. Just plain old accessing IP vars from
> multiple processes.
> 
> On Mon, Oct 31, 2016 at 10:12 PM, David Adams <[email protected]> wrote:
> 
>> Sure, it's absolutely possible to encounter a race condition if you write
>> to a shared resource (IP arrays in your case) without a locking mechanism.
>> It's likelihood increases in compiled mode and as you add more
>> participants. Even if you can't predict how often you'll encounter a race
>> condition, you already know that the chance is greater than zero.
>> ​...
>> 
>> 
>> * Hoping that it won't happen isn't a sound strategy. Maybe it won't, maybe
>> it will. It definitely might.
>> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> =======================




**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to