{"id":18497970,"url":"https://github.com/pouyakary/uniparallel","last_synced_at":"2025-05-14T05:19:07.717Z","repository":{"id":82963834,"uuid":"133354991","full_name":"pouyakary/uniparallel","owner":"pouyakary","description":"A set of tools for Go to teach Parallel Programming","archived":false,"fork":false,"pushed_at":"2018-05-21T16:21:42.000Z","size":690,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-25T17:42:20.439Z","etag":null,"topics":["barrier","channels","forall","multi-pascal","multi-threading","parallel-programming","spinlock","university","university-project"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/pouyakary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-14T12:08:36.000Z","updated_at":"2019-07-29T20:34:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"65998a19-99f6-4827-9e28-877de9db336d","html_url":"https://github.com/pouyakary/uniparallel","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/pouyakary%2Funiparallel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouyakary%2Funiparallel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouyakary%2Funiparallel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouyakary%2Funiparallel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pouyakary","download_url":"https://codeload.github.com/pouyakary/uniparallel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239217108,"owners_count":19601593,"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":["barrier","channels","forall","multi-pascal","multi-threading","parallel-programming","spinlock","university","university-project"],"created_at":"2024-11-06T13:36:47.274Z","updated_at":"2025-02-17T00:42:29.884Z","avatar_url":"https://github.com/pouyakary.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# University Parallel\n\nUniParallel is a simple atomic go library that provides you with some goodies in order to develop parallel software.\n\n## What you get?\n\n### Forall (from Multi Pascal)\nIn Multi-Pascal there is this grammar `forall` that is a parallel for. UniParallel provides the same functionality by a function called `ForAll`.\n\nThe function gets a range `start` to `end` for the iterating range, grouping of the threads a function (`func (index int) { ... }`) to be the body of the for.\n\n```go\nparallel.ForAll(start, end, grouping, func(index int) {\n    fmt.Println( index )\n})\n```\n\n### Spin Lock\nUniParallel provides a Spin Lock implementation for Go. The lock implementation is fairly easy to use:\n\n```go\nvar lock parallel.SpinLock\ncounter := 0\nparallel.ForAll(1, 10, 4, func(index int) {\n    lock.Lock()\n    counter++\n    lock.Unlock()\n})\n```\n\nA higher level abstract is to use `RunSafe`. It locks the runtime and then runs a given function and unlocks as soon as the function ends. It's a very bad way to use the spin lock, very high footprint and so bad for the performance, but it's a pretty abstract:\n\n```go\nparallel.RunSafe(func() {\n    someFunctionRunningInLockedRuntime()\n})\n```\n\n### Terminal \u0026 I/O\nAs UniParallel is intended for use in a university course it has some easy functionality to handle data and terminal I/O to make it easier to write educational software\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouyakary%2Funiparallel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpouyakary%2Funiparallel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouyakary%2Funiparallel/lists"}