aboutsummaryrefslogtreecommitdiffstats
path: root/P3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--P3/server.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/P3/server.c b/P3/server.c
index 3a2a537..9aa0a5b 100644
--- a/P3/server.c
+++ b/P3/server.c
@@ -180,8 +180,11 @@ int main(int argc, char **argv) {
// Start the server
init(port);
// Create dispatcher and worker threads (all threads should be detachable)
- pthread_t thread;
- pthread_create(&thread, NULL, dispatch, NULL); // DEBUG! figure out last arg
+ pthread_t dThreads[dispatchers];
+ pthread_create(&dThreads, NULL, dispatch, NULL); // DEBUG! figure out last arg
+
+ pthread_t wThreads[workers];
+ pthread_create(&wThreads, NULL, worker, NULL); //TODO: Worker arguments.
// Create dynamic pool manager thread (extra credit A)