{"id":17068949,"url":"https://github.com/kgn/kgnthread","last_synced_at":"2025-03-23T10:41:30.819Z","repository":{"id":56917182,"uuid":"50320836","full_name":"kgn/KGNThread","owner":"kgn","description":"A collection of helpful methods that wrap GCD","archived":false,"fork":false,"pushed_at":"2016-07-06T05:09:00.000Z","size":20,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T21:23:51.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","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/kgn.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":"2016-01-25T02:35:00.000Z","updated_at":"2016-02-19T16:03:55.000Z","dependencies_parsed_at":"2022-08-21T03:50:49.672Z","dependency_job_id":null,"html_url":"https://github.com/kgn/KGNThread","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGNThread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGNThread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGNThread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGNThread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kgn","download_url":"https://codeload.github.com/kgn/KGNThread/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245090894,"owners_count":20559296,"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-10-14T11:15:41.869Z","updated_at":"2025-03-23T10:41:30.776Z","avatar_url":"https://github.com/kgn.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KGNThread\n\n`KGNThread` is a collection of helpful methods that wrap [Grand Central Dispatch](https://en.wikipedia.org/wiki/Grand_Central_Dispatch).\n\n[![Release](https://img.shields.io/github/release/kgn/KGNThread.svg)](/releases)\n[![License](http://img.shields.io/badge/License-MIT-lightgrey.svg)](/LICENSE)\n\n[![Build Status](https://travis-ci.org/kgn/KGNThread.svg)](https://travis-ci.org/kgn/KGNThread)\n[![Test Coverage](http://img.shields.io/badge/Tests-100%25-green.svg)]()\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-Compatible-4BC51D.svg)](https://github.com/Carthage/Carthage)\n[![CocoaPods Version](https://img.shields.io/cocoapods/v/KGNThread.svg)](https://cocoapods.org/pods/KGNThread)\n[![CocoaPods Platforms](https://img.shields.io/cocoapods/p/KGNThread.svg)](https://cocoapods.org/pods/KGNThread)\n\n[![Twitter](https://img.shields.io/badge/Twitter-@iamkgn-55ACEE.svg)](http://twitter.com/iamkgn)\n[![Follow](https://img.shields.io/github/followers/kgn.svg?style=social\u0026label=Follow%20%40kgn)](https://github.com/kgn)\n[![Star](https://img.shields.io/github/stars/kgn/KGNThread.svg?style=social\u0026label=Star)](https://github.com/kgn/KGNThread)\n\n## Installing\n\n### Carthage\n```\ngithub \"kgn/KGNThread\"\n```\n\n### CocoaPods\n```\npod 'KGNThread'\n```\n\n## Examples\n\nEach method is called with an optional delay, and a block to execute on the thread.\n\n### Main\nDispatch on the main thread, useful for updating the UI from a background thread.\n``` Swift\nThread.Main {\n\t// Do something on the main thread\n}\n\nThread.Main(delay: 2) {\n\t// Do something on the main thread,\n\t// after a 2 second delay\n}\n```\n\n### Disk\nDispatch on a serial queue reserved for disk access.\n``` Swift\nThread.Disk {\n\t// Write to disk...\n}\n```\n\n### Global\nDispatch on the global threads: `high`, `low`, `default`, `background`.\n``` Swift\nThread.High {\n\t// Do something high priority\n}\n\nThread.Low(delay: 5) {\n\t// Do something low priority,\n\t// after a 5 second delay\n}\n```\n\n## Progress\n- [X] Badges\n- [X] Tests\n- [X] Travis\n- [X] Carthage\n- [X] CocoaPods\n- [X] Description\n- [X] Documentation\n- [X] AppleTV\n- [X] AppleWatch\n- [X] Prebuilt Frameworks\n- [ ] Travis Test Matrix\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgn%2Fkgnthread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkgn%2Fkgnthread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgn%2Fkgnthread/lists"}