Here's pseudo code to handle critical sections:

if (user$active>0)
     error return, "sorry, you have a request pending, try again"
else
     user$active=user$active+1
if  (user$active=1)
     process stuff
else
     error return:  "sorry a thread inserted itself between the first 
error check and the processing check"
endif
user$active=user$active-1
good return



>Where would I look to find out how to create a "thread safe" class file?
>
>Steve Fogelson
>Internet Commerce Solutions
>________________________________________________________________________
>TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>


Bill Conlon

To the Point
345 California Avenue Suite 2
Palo Alto, CA 94306

office: 650.327.2175
fax:    650.329.8335
mobile: 650.906.9929
e-mail: mailto:[EMAIL PROTECTED]
web:    http://www.tothept.com


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to