Package coilmq :: Package util :: Module concurrency
[frames] | no frames]

Module concurrency

Tools to facilitate developing thread-safe components.


Author: "Hans Lellelid" <hans@xmpl.org>

Copyright: Copyright 2009 Hans Lellelid

License: Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Functions
 
synchronized(func)
Decorator to lock and unlock a method (Phillip J.
Function Details

synchronized(func)

 

Decorator to lock and unlock a method (Phillip J. Eby).

This function is to be used with object instance methods; the object must have a _lock variable (of type threading.Lock or threading.RLock).

Parameters:
  • func (callable) - Method to decorate