{"id":17955660,"url":"https://github.com/smallnest/syncx","last_synced_at":"2025-06-29T12:36:06.867Z","repository":{"id":57604419,"uuid":"242663369","full_name":"smallnest/syncx","owner":"smallnest","description":"more advanced sync primitives in Go","archived":false,"fork":false,"pushed_at":"2020-02-28T09:21:33.000Z","size":17,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T06:42:47.616Z","etag":null,"topics":["primitives","sync"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smallnest.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-02-24T06:30:19.000Z","updated_at":"2021-12-16T20:52:56.000Z","dependencies_parsed_at":"2022-09-04T13:52:20.377Z","dependency_job_id":null,"html_url":"https://github.com/smallnest/syncx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Fsyncx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Fsyncx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Fsyncx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Fsyncx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smallnest","download_url":"https://codeload.github.com/smallnest/syncx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245385300,"owners_count":20606642,"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":["primitives","sync"],"created_at":"2024-10-29T10:31:38.037Z","updated_at":"2025-03-25T02:30:52.316Z","avatar_url":"https://github.com/smallnest.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# syncx\n\n[![License](https://img.shields.io/:license-apache%202-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![GoDoc](https://godoc.org/github.com/smallnest/syncx?status.png)](http://godoc.org/github.com/smallnest/syncx)  [![travis](https://travis-ci.org/smallnest/syncx.svg?branch=master)](https://travis-ci.org/smallnest/syncx) [![Go Report Card](https://goreportcard.com/badge/github.com/smallnest/syncx)](https://goreportcard.com/report/github.com/smallnest/syncx) [![coveralls](https://coveralls.io/repos/smallnest/syncx/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/smallnest/syncx?branch=master) \n\n\nMore Advanced sync primitives.\n\nImplemented some Go sync primitives.\n\n\n## Token\n\nprovides token implementation.\n\nOnly the one thats owns the `Token` can do stuff and then it can handoffs the token to others.\n\n\n## Batch\n\nprovides batch implementation.\n\nIt is like `errgroup` and can return all errors results of each task.\n\n## Any\n\nprovides partial batch implementation.\n\nYou can wait some tasks have finished and returns.\n\n## Stentor\n\nprovides pub-sub(observer) pattern.\n\n## Examples\n\nuse **syncx** to solve [leetcode concurrency problems](https://leetcode.com/problemset/concurrency/)\n\n- [1115 Print FooBar Alternately](https://leetcode.com/problems/print-foobar-alternately): [solution](https://github.com/smallnest/leetcode/tree/master/1115_print_foobar_alternately)\n- [1116 Print Zero Even Odd](https://leetcode.com/problems/print-zero-even-odd): [solution](https://github.com/smallnest/leetcode/tree/master/1116_print_zero_even_odd)\n- [1195 Fizz Buzz Multithreaded](https://leetcode.com/problems/fizz-buzz-multithreaded): [solution](https://github.com/smallnest/leetcode/tree/master/1195_fizz_buzz_multithreaded)\n## Other advanced sync primitives\n\n- [singleflight](https://github.com/golang/sync/tree/master/singleflight): provides a duplicate function call suppression\n- [errgroup](https://github.com/golang/sync/blob/master/errgroup/errgroup.go): provides synchronization, error propagation, and Context cancelation for groups of goroutines working on subtasks of a common task\n- [semaphore](https://github.com/golang/sync/tree/master/semaphore): provides a weighted semaphore implementation","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallnest%2Fsyncx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmallnest%2Fsyncx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallnest%2Fsyncx/lists"}