{"id":21565108,"url":"https://github.com/cfware/p-mutex","last_synced_at":"2025-03-18T05:17:26.287Z","repository":{"id":57101041,"uuid":"112824995","full_name":"cfware/p-mutex","owner":"cfware","description":"Promise based mutex","archived":false,"fork":false,"pushed_at":"2020-11-06T15:13:57.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T21:05:33.231Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-02T08:14:55.000Z","updated_at":"2020-11-06T15:13:59.000Z","dependencies_parsed_at":"2022-08-20T21:11:01.833Z","dependency_job_id":null,"html_url":"https://github.com/cfware/p-mutex","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfware%2Fp-mutex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfware%2Fp-mutex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfware%2Fp-mutex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfware%2Fp-mutex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfware","download_url":"https://codeload.github.com/cfware/p-mutex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244160055,"owners_count":20408021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T10:18:26.982Z","updated_at":"2025-03-18T05:17:26.265Z","avatar_url":"https://github.com/cfware.png","language":"JavaScript","readme":"# @cfware/p-mutex [![NPM Version][npm-image]][npm-url]\n\nPromise based mutex\n\n## Usage\n\n```js\nimport {PMutex} from '@cfware/p-mutex';\n\n/* PMutex ignores any parameters. */\nconst mutex = new PMutex();\n\nexport const serializedAsyncAction = async () =\u003e {\n\tconst lock = await mutex.lock();\n\n\t/* Do some stuff, release the lock eventually. */\n\tsetTimeout(() =\u003e lock.release(), 10);\n}\n```\n\nThis module does not provide timeout functionality.  `lock.release()` must be\ncalled or the `mutex.lock()` will never resolve again.\n\n\n[npm-image]: https://img.shields.io/npm/v/@cfware/p-mutex.svg\n[npm-url]: https://npmjs.org/package/@cfware/p-mutex\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfware%2Fp-mutex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfware%2Fp-mutex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfware%2Fp-mutex/lists"}