From 6f7cf6e1094e54e593801cc452b65ae9c7b4824a Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 17 Sep 2024 10:56:41 -0400 Subject: Remove short circuit test code * Remove exmain() and dead comments from main() --- src/multiprocessing.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'src/multiprocessing.c') diff --git a/src/multiprocessing.c b/src/multiprocessing.c index 8709911..8e11a93 100644 --- a/src/multiprocessing.c +++ b/src/multiprocessing.c @@ -437,31 +437,4 @@ void mp_pool_free(struct MultiProcessingPool **pool) { } (*pool) = NULL; } -} - -int exmain(int argc, char *argv[]) { - size_t i; - struct MultiProcessingPool *pool = mp_pool_init("generic", "logs"); - if (!pool) { - perror("pool init"); - exit(1); - } - - char *commands[] = { - "sleep 2; dd if=/dev/zero of=file.dat bs=1M count=1", - "/bin/echo hello world; sleep 5", - "python -c 'print(1+1)'", - "(for x in {1..10}; do echo $x; sleep 0.5; done)", - "echo stdout >&1; echo stderr >&2; exit 1" - }; - - for (i = 0; i < sizeof(commands) / sizeof(*commands); i++) { - if (mp_task(pool, "commands array", commands[i]) == NULL) { - printf("Too many tasks queued (max: %d)\n", MP_POOL_TASK_MAX); - break; - } - } - mp_pool_join(pool, get_cpu_count() - 1, MP_POOL_FAIL_FAST); - mp_pool_free(&pool); - return 0; -} +} \ No newline at end of file -- cgit