{"id":20315237,"url":"https://github.com/sysread/coro-countdown","last_synced_at":"2026-05-11T00:39:45.730Z","repository":{"id":56833234,"uuid":"110029200","full_name":"sysread/Coro-Countdown","owner":"sysread","description":"A counter that signals when it reaches 0 for coro and perl","archived":false,"fork":false,"pushed_at":"2017-11-08T21:30:54.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T05:58:44.478Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysread.png","metadata":{"files":{"readme":"README.pod","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-08T20:52:36.000Z","updated_at":"2017-11-08T20:53:40.000Z","dependencies_parsed_at":"2022-09-08T07:50:43.339Z","dependency_job_id":null,"html_url":"https://github.com/sysread/Coro-Countdown","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2FCoro-Countdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2FCoro-Countdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2FCoro-Countdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2FCoro-Countdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysread","download_url":"https://codeload.github.com/sysread/Coro-Countdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241818875,"owners_count":20025210,"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-14T18:18:25.355Z","updated_at":"2026-05-11T00:39:45.678Z","avatar_url":"https://github.com/sysread.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"=pod\n\n=encoding UTF-8\n\n=head1 NAME\n\nCoro::Countdown - a counter that signals when it reaches 0\n\n=head1 VERSION\n\nversion 0.02\n\n=head1 SYNOPSIS\n\n  use Coro;\n  use Coro::Countdown;\n\n  my $counter = Coro::Countdown-\u003enew;\n  $counter-\u003eup;\n  \n  async { $counter-\u003edown };\n\n  # Block until $counter-\u003edown is called\n  $counter-\u003ejoin;\n\n=head1 DESCRIPTION\n\nOftentimes it is necessary to wait until all users of a resource have completed\nbefore a program may continue. Examples of this include a pool of pending\nnetwork requests, etc. A countdown signal will broadcast to any waiters once\nall \"checked out\" resources have been \"returned\".\n\n=head1 METHODS\n\n=head2 new\n\nOptionally takes an initial value, defaulting to 0.\n\n=head2 join\n\nCedes until the count decrements to 0. If the counter is already at 0, returns\nimmediately.\n\n=head2 count\n\nReturns the current counter value.\n\n=head2 up\n\nIncrements the counter value (\"checks out\" a resource).\n\n=head2 down\n\nDecrements the counter value (\"returns\" the resource). If the counter reaches\n0, all watchers are signaled and the counter resets. It is then ready to be\nreused.\n\n=head1 AUTHOR\n\nJeff Ober \u003csysread@fastmail.fm\u003e\n\n=head1 COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2017 by Jeff Ober.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n\n=cut\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysread%2Fcoro-countdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysread%2Fcoro-countdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysread%2Fcoro-countdown/lists"}