Mercurial
comparison .claude/skills/zenbu-seobeo-networking/SKILL.md @ 250:745fd127b2a1
[seobeo] Add bounded worker interface
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Tue, 04 Aug 2026 06:23:37 -0700 |
| parents | b8b6e726964a |
| children | 609d3c6aff4e |
comparison
equal
deleted
inserted
replaced
| 249:c5129452493e | 250:745fd127b2a1 |
|---|---|
| 62 ```c | 62 ```c |
| 63 Seobeo_WebSocket_Server_Init(); | 63 Seobeo_WebSocket_Server_Init(); |
| 64 Seobeo_WebSocket_Server_Register("/chat", Chat_Handler, NULL); | 64 Seobeo_WebSocket_Server_Register("/chat", Chat_Handler, NULL); |
| 65 ``` | 65 ``` |
| 66 | 66 |
| 67 Background work: | |
| 68 | |
| 69 ```c | |
| 70 Seobeo_Worker_Pool *pool = Seobeo_Worker_Pool_Create(2, 16); | |
| 71 Seobeo_Worker_Pool_Submit(pool, Process_File, context, free); | |
| 72 Seobeo_Worker_Pool_Shutdown(pool, TRUE); | |
| 73 Seobeo_Worker_Pool_Destroy(pool); | |
| 74 ``` | |
| 75 | |
| 76 Use `Seobeo_Thread_Start` + `Seobeo_Thread_Join` for one joinable task, or | |
| 77 `Seobeo_Thread_Start_Detached` for fire-and-forget work. Prefer a bounded pool | |
| 78 for request-triggered FFmpeg, upload, or other expensive jobs. | |
| 79 | |
| 67 ## Build targets | 80 ## Build targets |
| 68 | 81 |
| 69 Choose the smallest library variant that matches the feature: | 82 Choose the smallest library variant that matches the feature: |
| 70 | 83 |
| 71 - `//seobeo:seobeo_min`: TCP/SSL basics. | 84 - `//seobeo:seobeo_min`: TCP/SSL basics. |
| 73 - `//seobeo:seobeo_tcp_server_ws`: HTTP server with WebSocket. | 86 - `//seobeo:seobeo_tcp_server_ws`: HTTP server with WebSocket. |
| 74 - `//seobeo:seobeo_tcp_client`: HTTP client. | 87 - `//seobeo:seobeo_tcp_client`: HTTP client. |
| 75 - `//seobeo:seobeo_tcp_client_ws`: HTTP client with WebSocket. | 88 - `//seobeo:seobeo_tcp_client_ws`: HTTP client with WebSocket. |
| 76 - `//seobeo:seobeo`: full combined library. | 89 - `//seobeo:seobeo`: full combined library. |
| 77 - `//seobeo:seobeo_debug`: full library with debug logging. | 90 - `//seobeo:seobeo_debug`: full library with debug logging. |
| 91 - `//seobeo:seobeo_worker`: standalone thread/worker-pool API. | |
| 78 | 92 |
| 79 ## Tests | 93 ## Tests |
| 80 | 94 |
| 81 Run the narrowest relevant tests first: | 95 Run the narrowest relevant tests first: |
| 82 | 96 |