There is the possibility for race conditions, so it depends what your
component is doing. If your component has the following method:
<cffunction name="performMath">
<cfargument name="num1" type="numeric" required="true" />
<cfargument name="num2" type="numeric" required="true" />
<cfset var result = (num1 * 2) + num2 />
<cfreturn result />
</cffunction>
This method in an application scoped component is thread safe. There is
no instance data that could change for each request.
But this method is not thread safe:
<cffunction name="performMath">
<cfset var result = (variables.num1 * 2) + variables.num2/>
<cfreturn result />
</cffunction>
Thread safety becomes an issue when you are dealing with instance data
within the component (the variables scope) that could change based on
the actions of a different request. In cases like this you would need
to lock the transaction just as you would any other shared scope
variable.
HTH,
Rich Kroll
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268313
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4