I create some threads in a for loop and after this loop, join them in other loop. they do their function till all of them finish it,do they? my last result is logically wrong . my result is correct, just when join each thread after create it!!
1
There are 1 best solutions below
Related Questions in PTHREADS
- Multithreaded program not producing desired output
- Blocking in pthread_join()
- Unix c program to calculate pi using threads
- How to process A direct send message to a thread of process B?
- PThread robust mutex not working
- How do I install pthreads on Debian?
- How to make a robust mutex on AIx [7.1]
- Two-Lock Concurrent Queue Algorithm implementation issue
- Parallel QuickSort C implementation
- How to control the thread of child process
- pthread process shared mutex deadlock
- pthreads SIGEV_THREAD and async-safe function calls
- Cannot assign value to array using PHP pthreads
- Android NDK and pthread
- Pthread join segmentation fault
Related Questions in PTHREAD-JOIN
- pthred_exit return variable static vs global scope
- Parallel programming using Pthreads
- pthread_join() unexpected results
- pthread_join() for asynchronous threads
- Peterson's Algorithm to avoid race condition between threads
- pthread_join and pthread_exit
- use of pointer to pointer in pthread_join function
- pthread_join segment fault
- segmentation fault after pthread_join
- how to know which thread was released by pthread_cond_signal
- ·Wait for first of various threads in C
- Java Multithreading concept and join() method
- Why doesn't multithreading improve performance in this program for finding primes?
- A detached pthread causes memory leaks
- Joining threads in a loop - Conversion error
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Yes i think you are doing right.Letsee for example
Its your decision when you want to exit that thread by calling
pthread_exit function.Absolutely there is no certainty that which thread will be executed first.Your OS will decide when resources are available for your threads and execute them on whatever CPU is least occupied