nrlock.py revision 1516
1271N/A# The contents of this file are subject to the terms of the 1271N/A# Common Development and Distribution License (the "License"). 1271N/A# You may not use this file except in compliance with the License. 1271N/A# See the License for the specific language governing permissions 1271N/A# and limitations under the License. 1271N/A# When distributing Covered Code, include this CDDL HEADER in each 1271N/A# If applicable, add the following below this CDDL HEADER, with the 1271N/A# fields enclosed by brackets "[]" replaced with your own identifying 1271N/A# information: Portions Copyright [yyyy] [name of copyright owner] 1271N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 1271N/A# Use is subject to license terms. 1271N/A"""Interface and implementation for Non-Reentrant locks. Derived from 1271N/ARLocks (which are reentrant locks). The default Python base locking 1271N/Atype, threading.Lock(), is non-reentrant but it doesn't support any 1271N/Aoperations other than aquire() and release(), and we'd like to be able 1271N/Ato support things like RLocks._is_owned() so that we can "assert" lock 1271N/Aownership assumptions in our code.""" 1271N/A# Rename some stuff so "from pkg.nrlock import *" is safe