generalpenguin89/tpool — Issue #2: Export a struct tpool_task, and use it for tpool_submit()
Author: generalpenguin89
Created: 2011-12-24 18:39:43+00:00
State: open

```tpool_submit()``` takes 5 arguments currently, one of which is optional if the previous argument is not supplied. It may be clearer if we just export a struct to the user, and have the user fill in the struct and then pass the struct in as arguments. This would make this function similar to ```sigaction(2)```.

Thus, the new signature would be

```C
int
tpool_submit(TPOOL *tpool, struct tpool_task *task, FUTURE **future)
{
}
```

and the struct would most likely contain:

```C
struct tpool_task {
void *(*task)(void *);
void *arg;
int flags;
};
```

This would also require that the queue create its own internal chain structure that also kept track of associated internal structures for each task.