摘要 |
<p>PROBLEM TO BE SOLVED: To provide an inter-thread communication method, inter-thread communication system, and inter-thread communication program that can deliver information without contradiction and without using CAS operation between threads and are wait-free.SOLUTION: Each thread is equipped with pipes the number of which corresponds to the number of other threads, and a transmission thread adds a new node 511 to the end of the pipes and stores it. In addition, a taking-out thread takes out a record from a node 712 at a place indicated by a pointer variable when the pointer variable of the head node of the pipes is not an invalid value. On the other hand, when the pointer variable is an invalid value, it is determined that there is no record that can be taken out. In this way, each thread is equipped with pipes the number of which corresponds to the number of other threads, and in addition, the transmission thread stores a node in the pipes and the taking-out thread takes out a record from the pipes.</p> |