Class Mutex

Description

Mutex Class

This class provides a simple mutex lock

phpGedView: Genealogy Viewer Copyright (C) 2002 to 2005 John Finlay and Others

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

  • author: John Finlay
  • version: $Id: $

Located in /includes/mutex_class.php (line 34)


	
			
Variable Summary
mixed $name
mixed $waitCount
Method Summary
Mutex Mutex (string $name, [boolane $acquire = false])
string getName ()
int getWaitCount ()
void Release ()
boolean Wait ([int $time = -1])
Variables
mixed $name (line 35)
mixed $waitCount (line 36)
Methods
Constructor Mutex (line 45)

Create a mutex for enforcing mutual exclusion

Mutex Mutex (string $name, [boolane $acquire = false])
  • string $name: the system wide name of the mutex
  • boolane $acquire: whether or not to acquire the mutex after it is created
getName (line 127)

Get the name of this mutex

string getName ()
getWaitCount (line 118)

Get the number of times thread waited to acquire mutex

int getWaitCount ()
Release (line 102)

Release the mutex previously acquired

void Release ()
Wait (line 68)

Try to acquire the mutex. Block the thread if it cannot obtain it.

  • return: true if successful, false if failed
boolean Wait ([int $time = -1])
  • int $time: [optional] parameter to only wait for $time secs before giving up

Documentation generated on Wed, 28 Mar 2007 09:54:27 -0600 by phpDocumentor 1.3.1