|
Thank you for your answer.
I was familiar with your previous message and I have to
agree that using an external source for locking is the only reasonable solution
to this problem; and a fast performing DB would
help.
However, without running any tests yet, it seems to me that
this solution will use the DB as other frameworks would use a semaphore. And it
has to be a penalty in access time and complexity over a solution provided
by design, which would not lock the DB.
So I see the case when the currently running threads do not
access the shared variables (domain, application, user); here
pre-emptive multi-tasking will offer faster response.
In any other case ( which by far is the majority ) there is
no benefit, and a mechanism like the one you suggested has to be implemented to
assure at least safety if not performance.
I feel an intrinsic ( provided by the manufacturer
) locking mechanism should have been provided, to make multithreading
really useful.
Mihai.
San Jose,
CA 408-887-5223 From: Robert Shubert [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 13:46 To: [EMAIL PROTECTED] Subject: RE: Witango-Talk: Tread Safety in Witango 5 !? 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 ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf |
- RE: Witango-Talk: Tread Safety in Witango 5 !? Robert Shubert
