{"id":13661534,"url":"https://github.com/ousttrue/DepthFirstScheduler","last_synced_at":"2025-04-25T02:33:35.986Z","repository":{"id":136458570,"uuid":"146183773","full_name":"ousttrue/DepthFirstScheduler","owner":"ousttrue","description":"Asynchronous task scheduler for Unity-5.6 or later","archived":true,"fork":false,"pushed_at":"2018-12-29T14:37:28.000Z","size":22,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-10T16:45:13.296Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/ousttrue.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-08-26T13:40:04.000Z","updated_at":"2024-02-21T07:19:49.000Z","dependencies_parsed_at":"2024-01-26T19:22:09.553Z","dependency_job_id":"ab426a9c-70f9-47d5-a49a-573fe436197f","html_url":"https://github.com/ousttrue/DepthFirstScheduler","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/ousttrue%2FDepthFirstScheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2FDepthFirstScheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2FDepthFirstScheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2FDepthFirstScheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ousttrue","download_url":"https://codeload.github.com/ousttrue/DepthFirstScheduler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250742116,"owners_count":21479734,"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-08-02T05:01:36.577Z","updated_at":"2025-04-25T02:33:35.712Z","avatar_url":"https://github.com/ousttrue.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"\u003e I decided to integrate this library with UniVRM for maintenance reason (submodule burdensome). Continue updating within UniVRM\n\n* [UniVRM](https://github.com/dwango/UniVRM)\n\n# DepthFirstScheduler(深さ優先スケジューラー)\nAsynchronous task scheduler for Unity-5.6 or later\n\nこれは、Unity5.6でTaskが無いことを補完するためのライブラリです。\n木構造にタスクを組み立てて深さ優先で消化します。\n\n* タスクの実行スケジューラー(Unityメインスレッドやスレッドプール)を指定できる\n\n# 使い方\n\n```cs\nvar schedulable = new Schedulable\u003cUnit\u003e();\n\nschedulable\n    .AddTask(Scheduler.ThreadPool, () =\u003e // 子供のタスクを追加する\n    {\n        return glTF_VRM_Material.Parse(ctx.Json);\n    })\n    .ContinueWith(Scheduler.MainThread, gltfMaterials =\u003e // 兄弟のタスクを追加する\n    {\n        ctx.MaterialImporter = new VRMMaterialImporter(ctx, gltfMaterials);\n    })\n    .Subscribe(Scheduler.MainThread, onLoaded, onError);\n    ;\n```\n\n# Schedulable\u003cT\u003e\nT型の結果を返すタスク。\n\n## AddTask(IScheduler scheduler, Func\u003cT\u003e firstTask) \n\n子供のタスクを追加する。\n\nToDo: 一つ目の子供に引数を渡す手段が無い\n\n## ContinueWith\n\n## ContinueWithCoroutine\n\n## OnExecute\n\n動的にタスクを追加するためのHook。\n\n中で、\n\n```\nparent.AddTask\n```\n\nすることで実行時に子タスクを追加できる。\n\n## Subscribe\nタスクの実行を開始する。\n実行結果を得る。\n\n\n# Scheduler\n## StepScheduler\nUnity\n## CurrentThreadScheduler\n即時\n## ThreadPoolScheduler\nスレッド\n## ThreadScheduler\nスレッド\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fousttrue%2FDepthFirstScheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fousttrue%2FDepthFirstScheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fousttrue%2FDepthFirstScheduler/lists"}