action #10604
closedmutex lock looks does not work
0%
Description
I create 2 parallel job (jerry,jerry1):
for jerry1 (parent):¶
sub run() {
check_screen "jerry_wait11", 300;
mutex_create('xxx');
sleep 20;
}
1;¶
for jerry (child):¶
#!/usr/bin/perl -w
use strict;
use base "basetest";
use testapi;
use lockapi;
sub run() {
mutex_unlock('xxx');
sleep 20;
}
1;¶
two job in same test group.
I run this jobs , it was started in parallel. but test mutex does work ,
mutex_unlock won't in block.
and I wonder how does block looks like : "mutex lock 'xxx' unavailable, sleeping 5s" ?
if like this. I think it is from mutex_lock function in lockapi . (which means mutex_unlock won't block right?)
Updated by jerrytang about 8 years ago
jerrytang wrote:
I run this jobs , it was started in parallel. but test mutex does work ,
sorry , it should be "does not work"
Updated by okurz over 7 years ago
- Status changed from New to Resolved
sorry we never came back to this. AFAIR this was resolved in some discussion and better explanations of how the mutex lock is supposed to work. Closing is resolved. Feel free to reopen with some explanation if you think otherwise.