Original Summary

Hey! I’m a Godot game dev and .NET enthusiast. On the C# side I kept hitting the same problem: I wanted named groups of async work to run exclusive/serial (or parallel inside a group) without wrapping every call site in locks, queues, or custom using scopes. Full job systems felt heavy; hand-rolled semaphore soup got ugly once cancellation and host shutdown entered the picture. So I built GroupedScheduling. What it is An open-source .NET library where you mark methods with [ScheduleGroup]. Callers keep normal await / delegates / reflection. A build-time IL weaver rewrites the methods after compile and injects scheduling, nesting checks, and linked cancellation. No Fody. One NuGet package brings everything: Runtime library Roslyn analyzers (TSCH001–005) MSBuild post-compile weaver Quick example using GroupedScheduling; using GroupedScheduling.Hosting; // once in the host process builder.Services.AddGroupedScheduling(); public sealed class OrdersService { [ScheduleGroup("orders", ScheduleMode.ExclusiveSerial)] public async Task SaveAsync(Order order, CancellationToken ct) { await _db.SaveAsync(order, ct); } } // callers stay clean await orders.SaveAsync(order, ct); Modes ExclusiveSerial — one at a time in the group ExclusiveParallel — parallel within the group FullyConcurrent — bypasses the exclusive lane On host stop, AddGroupedScheduling() cancels object/type tokens and rejects new scheduled work. Stack / packaging C# / .NET (net11.0 for this release) Mono.Cecil for weaving MIT license Docs + sample app in the repo Links GitHub: https://github.com/ChronosDevZero/grouped-scheduling NuGet: https://www.nuget.org/packages/GroupedScheduling.Build Would love feedback — API shape, modes, docs, or “I’d never use this because ___”. Stars and issues welcome too if it looks useful to you.   submitted by   /u/Vagossssssssss [link]   [comments]


  • 情报分类:工作与职业机会
  • 分类依据:内容涉及招聘、求职或职业发展
  • 信息来源:Reddit · SideProject
  • 发布时间:2026/10/17 01:17:15