Your application would yield the results
you got using the domain scope for your variables. If you think about making a simple request
counter, you might at first put <@ASSIGN domain$count <@CALC “@@domain$count
+ 1”>> at the top of all your TAFs, but this would actually produce
a request count slightly less than reality, depending on load/simultaneity. Witango is thread
safe only within the threads themselves, such as request scoped variables.
Domain variables exist outside of the threads in the server heap and can be
preempted. In your code, it is possible for two perfectly
timed threads to pass the wait_on_LOCK_0 while loop before the lock is
reapplied by one of the threads. The only solution I can suggest is to use
an external source of locking, such as a transaction based SQL server. I wrote
a post about a month ago which categorically stated that Witango has no means
by which to create and control its own locks, because it has no inherent transaction
capability. It’s true that T2K would not be able
to produce the same result, because each TAF execution was largely transactional
in nature. Robert -----Original Message----- Hi all, Six weeks ago I purchased the
upgrade from Tango 2000 (which I happily used for four years) to Witango. After reading everything that was
posted in terms of thread safety, multitasking, locking, etc. in the talk
group, I decided to let the code "speak". I have written a test which
I attached ( along with explanations, source code, and results as played on my
PC). It is as simple as it gets and I believe it makes the point
that Witango 5 is not thread -safe. All I want is to have somebody
show me where I go wrong. Is there a working alternative? This test works fine on the same
computer under Tango 2000, but does not do so under Witango 5. Apart from the change Tango2000 to
Witango 5, everything is the same (hardware, operating system, and code). The
obvious conclusion is that the W5 made the difference. This is why I would have
expected to get some explanations on how to handle the new server either in the
documentation or on the website. I could not find any such
information anywhere, so I wrote to Witango, asking for the missing information
and a working example. Their response was to pay for tech support. I also wrote to Mr. Phil Wade, but
so far (in the last 24 hours) I did not get a response. I find this experience to be both
unpleasant and worrisome. I am now stuck between Tango 2000,
which is obviously outdated, and Witango 5, which does not seem to work. I would greatly appreciate any help
I can get from any of you. Many thanks, Mihai Olariu San Jose, CA 408-887-5223 ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf |
- RE: Witango-Talk: Tread Safety in Witango 5 !? Robert Shubert