Some initial work towards resolving nasty fork/pthread issues, and to having a per-parser job list

This commit is contained in:
ridiculousfish
2012-02-27 18:43:24 -08:00
parent 50ee5d28cd
commit fdfa5c0602
13 changed files with 258 additions and 137 deletions

View File

@@ -1,4 +1,6 @@
#include "config.h"
#include "iothread.h"
#include "common.h"
#include <pthread.h>
#include <assert.h>
#include <errno.h>
@@ -139,6 +141,8 @@ static void iothread_spawn_if_needed(void) {
}
int iothread_perform_base(int (*handler)(void *), void (*completionCallback)(void *, int), void *context) {
ASSERT_IS_MAIN_THREAD();
ASSERT_IS_NOT_FORKED_CHILD();
iothread_init();
/* Create and initialize a request. */