With a high-speed, dynamic and continuous yarn manufacturing process, spinning production suffers from different problems of dynamic disturbances such as yarn breakage, machine breakdown, and yarn quality. Processing real-time tasks is critical for tackling these problems, except for satisfying the requirements of mass production. The existing spinning cyber-physical production systems (CPPS), however, rely on a cloud center for centralized processing of real-time tasks. Thus, it becomes increasingly difficult for them to meet real-time requirements. As such, this paper proposes a novel real-time task processing method for spinning CPPS based on edge computing. First, a new hybrid structure of edge computing nodes (ECN) that consists of both 1-1 and N-1 modes is introduced for different types of tasks in spinning CPPS such as fixed tasks, decision intensive tasks, and data-intensive tasks. Second, a collaboration mechanism is developed for collaborations between ECNs. The mathematical model and algorithms for real-time task processing are provided for a single ECN. Finally, a case study on a real spinning production is conducted. The results of this case study have demonstrated that the proposed method can significantly reduce the processing time of real-time tasks, as well as improve the production flexibility and production efficiency in spinning CPPS. The proposed method could be applied to continuous and batch manufacturing fields with high real-time requirements, such as weaving, chemical fiber production, and the pharmaceutical industry.