WIP: metzes attempt
authorRalph Boehme <slow@samba.org>
Sat, 26 Sep 2015 04:06:15 +0000 (06:06 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 17 May 2018 07:51:49 +0000 (09:51 +0200)
lib/tevent/tevent_threads.c

index e0b62bb64b9ffe95c278749aa1c14daa4cf52b7c..8894293ce2e893993c87fee2cc05b64847b2d5d5 100644 (file)
@@ -614,6 +614,25 @@ static void tevent_threadpool_req_cleanup(struct tevent_req *req,
                                                             &req->data);
 }
 
+#if 0
+typedef (*tevent_threadpool_fn_t)(struct tevent_threadpool_fn *fn, void *args);
+struct tevent_threadpool_job(TALLOC_CTX *mem_ctx, tevent_threadpool_fn_t fn)
+{
+       struct tevent_threadpool_fn *f;
+
+       f = talloc_zero(mem_ctx, struct tevent_threadpool_fn);
+       if (f == NULL) {
+               return NULL;
+       }
+
+       f->fn = fn;
+
+       talloc_set_destructor(f, ....);
+
+       return f;
+}
+#endif
+
 struct tevent_req *tevent_threadpool_send(struct tevent_threadpool *pool,
                                          void (*fn)(void *private_data),
                                          void *private_data)