How to use the deco.synchronized function in deco

To help you get started, we’ve selected a few deco examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mitmedialab / MediaCloud-Web-Tools / server / views / sources / collectionedit.py View on Github external
@synchronized
def _update_sources_in_parallel(sources):
    for m in sources:
        m['response'] = _update_source_worker(m)
    return sources
github mitmedialab / MediaCloud-Web-Tools / server / util / pushshift.py View on Github external
@synchronized
def reddit_url_submission_counts(story_list):
    results = defaultdict(dict)
    for s in story_list:
        results[s['stories_id']] = _reddit_url_submissions_for(s['url'])
    return results

deco

A decorator for concurrency

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis