Project

General

Profile

action #10604

mutex lock looks does not work

Added by jerrytang over 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Feature requests
Target version:
-
Start date:
2016-02-05
Due date:
% Done:

0%

Estimated time:
Difficulty:

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?)

History

#1 Updated by jerrytang over 5 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"

#2 Updated by okurz about 5 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.

Also available in: Atom PDF