Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Simple decorators to support synchronized methods

Project Description


This package provides a simple decorator to help synchronize methods across threads, to avoid problems of concurrent access.

It can be used like this:

from threading import Lock
from plone.synchronize import synchronized

class StupidStack(object):

    _elements = [] # not thread safe
    _lock = Lock()

    def push(self, item):

    def pop(self):
        last = self._elements[-1]
        del self._elements[-1]
        return last

The decorator takes care of calling lock.acquire() just before the method is executed, and lock.release() just after. If an exception is raised in the method, the lock will still be released.


1.0.2 (2016-11-01)

New features:

  • Test Python 3 compatibility. [datakurre]

1.0.1 - 2011-05-20

  • Add license metadata. [davisagli]

1.0 - 2011-04-30

  • No changes

1.0b1 - 2009-03-30

  • Initial release
Release History

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
plone.synchronize-1.0.2.tar.gz (4.4 kB) Copy SHA256 Checksum SHA256 Source Nov 1, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting