Re: thread::mutex lock problem, a bug?
- From: "Abuda" <haoning_fu@xxxxxxxxx>
- Date: 2 Feb 2006 12:27:34 -0800
Hi Zoran,
I tried "after 1", "after 1000", printouts from one thread still
dominates 100%.
I even changed my code to :
#================ code starts======================
thread::create {
puts "Thread [thread::id] is up"
set state_mutex [tsv::get MUTEX STATE]
proc test_mutex { } {
puts "State is ready"
thread::mutex lock [tsv::get MUTEX STATE]
tsv::set STATUS STATE ready
catch {thread::mutex unlock [tsv::get MUTEX STATE]}
#after 1000
after idle [list after 0 test_mutex]
}
test_mutex
thread::wait
}
#================== code ends ==========================
It won't have any difference. Would you please tell my how my posted
test program runs in your tclsh shell?
I looked at the source code,
the code do not check the case of
case w_DESTROY:
and PutMutex(mutexPtr) was moved out of while loop because of the
redundancy.
Is this piece of code is equivalent to last version?
Thank you.
.
- Follow-Ups:
- Re: thread::mutex lock problem, a bug?
- From: Zoran Vasiljevic
- Re: thread::mutex lock problem, a bug?
- References:
- Re: thread::mutex lock problem, a bug?
- From: Abuda
- Re: thread::mutex lock problem, a bug?
- From: Zoran Vasiljevic
- Re: thread::mutex lock problem, a bug?
- Prev by Date: Re: Help? tcl/tk 8.3 - removing bitmap shrinks widget size
- Next by Date: Re: http package: automatic decompression?
- Previous by thread: Re: thread::mutex lock problem, a bug?
- Next by thread: Re: thread::mutex lock problem, a bug?
- Index(es):
Relevant Pages
|
|