Bill Conlon wrote:
> 
> This brings up the question of thread-safe coding, as was discussed in
> the thread "a random question" by Alan Wolfe on 9/24/02.
> 
> It seems to me that this threading model now imposes new requirements on
> applications programmers to assure that their shared variables are
> properly protected.  It seems to me that writeable  variables in the
> application and server scopes now need to be wrapped with protection
> since they can be changed by other threads.
> 

Bill, you are correct. There was some discussion about this on the beta
list a while back as well. Basically, the example:

thread A---

  WHILE @@domain$var != 100

    @CALC @@domain$var = @@domain$var + 1

  /WHILE

and 

thread B---

  @CALC @@domain$var = @@domain$var + 1

running concurrently, could result in thread A's WHILE testing against
99 then 101, essentially "skipping" 100.

Witango has no inherent "TRANSACTION" statement that you could put
around variables, so you would need to write protection code yourself
for cases where multiple threads can cause corruption.

Everyone should be aware of what this can mean in their applications.

Robert Shubert
Tronics
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to