Spinning production is a typical continuous manufacturing process characterized by high speed and uncertain dynamics. Each manufacturing unit in spinning production produces various real-time tasks, which may affect production efficiency and yarn quality if not processed in time. This paper presents an edge computing-based method that is different from traditional centralized cloud computation because its decentralization characteristics meet the high-speed and high-response requirements of yarn production. Edge computing nodes, real-time tasks, and edge computing resources are defined. A system model is established, and a real-time task processing method is proposed for the edge computing scenario. Experimental results indicate that the proposed real-time task processing method based on edge computing can effectively solve the delay problem of real-time task processing in spinning cyber-physical systems, save bandwidth, and enhance the security of task transmission.