aboutsummaryrefslogtreecommitdiffstats
path: root/P3
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-11-16 08:09:16 -0600
committerMatt Strapp <strap012@umn.edu>2020-11-16 08:09:16 -0600
commitcce59d4b7a51a90eaa301e146f76c12829bc195f (patch)
tree40e64dbc32a183f7c33c503d422d274308d7fd0f /P3
parentAdd ; (diff)
downloadcsci4061-cce59d4b7a51a90eaa301e146f76c12829bc195f.tar
csci4061-cce59d4b7a51a90eaa301e146f76c12829bc195f.tar.gz
csci4061-cce59d4b7a51a90eaa301e146f76c12829bc195f.tar.bz2
csci4061-cce59d4b7a51a90eaa301e146f76c12829bc195f.tar.lz
csci4061-cce59d4b7a51a90eaa301e146f76c12829bc195f.tar.xz
csci4061-cce59d4b7a51a90eaa301e146f76c12829bc195f.tar.zst
csci4061-cce59d4b7a51a90eaa301e146f76c12829bc195f.zip
Make threads detached
Diffstat (limited to '')
-rw-r--r--P3/server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/P3/server.c b/P3/server.c
index d8c6f35..2f1b30b 100644
--- a/P3/server.c
+++ b/P3/server.c
@@ -231,17 +231,17 @@ int main(int argc, char **argv) {
// Create dispatcher threads (make detachable????)
pthread_t dThreads[dispatchers];
for (int i=0; i<dispatchers; i++) {
- pthread_create(&dThreads[i], NULL, dispatch, NULL); // DEBUG! figure out last arg
+ pthread_create(&dThreads[i], PTHREAD_CREATE_DETACHED, dispatch, NULL); // DEBUG! figure out last arg
}
//Create workers (make detachable?????)
pthread_t wThreads[workers];
for (int i = 0; i < workers; i++) {
- pthread_create(&wThreads[i], NULL, worker, NULL); //TODO: Worker arguments
+ pthread_create(&wThreads[i], PTHREAD_CREATE_DETACHED, worker, NULL); //TODO: Worker arguments
}
// Create dynamic pool manager thread (extra credit A)
if (dynFlag) {
pthread_t pThread;
- pthread_create(&pThread, NULL, dynamic_pool_size_update, NULL); //TODO: possible arguments
+ pthread_create(&pThread, PTHREAD_CREATE_DETACHED, dynamic_pool_size_update, NULL); //TODO: possible arguments
}