int server_thread_pool_add_work(server_thread_pool_t *pool, void *work_unit)
Returns 0 on failure 1 on success
The pool you provide is the pool returned by the server_thread_pool_new() function. The work you provide is simply a pointer ServerKit moves around for you, whatever it points at is up to you. Usually, it tends to be some structure that persists for the lifetime of a connection or session, including members for tracking the state of the session.
Note that the work_unit needs to persist until the work is finished and it will never be referenced again.
If you used SERVER_THREAD_POOL_QUEUE_ENTRY_SUPPLIED when creating the thread pool, the void *work_unit may not simply point at any data structure you wish. The API expects you to supply a server_queue_entry_t * in this case and place your opaque "whatever you want" pointer in the foo member of the supplied server_queue_entry_t.