سؤال

I solved a synchron. project in C by threads (using pthread.h), but I found out I need to do it with processes. Is that going to be difficult to redo? I have approx. 4 hours, should I even try? I don't know much about processes.

هل كانت مفيدة؟

المحلول

This depends on the problem and how you communicate between the threads.

If the threads are independent and don't require any communication, you can just use processes instead of threads. If there is a lot of communication and locking, it will be more difficult, of course. Then you must look into Inter-process communication like shared memory and semaphores.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top