Asynchronous network application program processing method

An application program and asynchronous network technology, applied in the field of network communication, can solve problems such as endangering system security, program failure, loss of communication content, etc., and achieve the effects of simplifying processing algorithms, efficient management, and saving software and hardware resources

Active Publication Date: 2013-05-08
ZHEJIANG DAHUA TECH CO LTD
View PDF6 Cites 26 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In this implementation, the pointer is only known to both parties of the communication object, and the communication is only carried out between the two objects. The thread of the system does not participate in the management of the communication content and communication process. Once both parties or one party of the object log out, communication will occur. The loss of content or even program failure will endanger the security of the entire system and is not conducive to the maintenance and expansion of network applications

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Asynchronous network application program processing method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] Such as figure 1 As shown, an asynchronous network application processing method in a specific embodiment of the present invention includes the following steps:

[0026] In step 101, multiple threads are established. The established multiple threads have the same operating logic, that is, the status of each thread is equal, there is no management thread that has the function of managing and dominating other threads, and each thread is an equivalent thread to each other. The thread executes the processing of the event, and the thread obtains the right to process the event by obtaining the global lock. The establishment of threads can be done through the application programming interface.

[0027] The global lock has the characteristic of mutual exclusion, that is, only one logic module can obtain the lock at any time, so the thread that only one logic module can obtain the lock at any time obtains the processing right of the queue. In the present invention, the logic ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an asynchronous network application program processing method. The method includes: establishing multiple threads, wherein each thread has a same operating logic; obtaining a global lock by one of the threads to obtain processing right to event queues; inquiring a to-be-processed event queue by the thread having the event queue processing right, and when to-be-processed events exist in the to-be-processed event queue, reading a to-be-processed event by the thread for processing the to-be-processed event; and when the to-be-processed event queue has no to-be-processed events, monitoring an event list by the thread, and when events are monitored by the thread, adding the events into the to-be-processed event queue. By establishing multiple equivalent threads and lock competing logics to the global lock among the multiple threads, compactness and efficiency in management of the multiple threads are realized, and software and hardware resources are saved; and by performing timeout processing through a compact thread model, a lightweight timer mechanism and a safe and efficient asynchronous information mechanism are realized.

Description

technical field [0001] The invention relates to network communication technology, in particular to an asynchronous network application program processing method. Background technique [0002] Asynchronous network application means that when a thread is scheduled, the caller does not need to wait for the result, but can process other events, and the logic unit that executes the thread call passes the result through status, message, or The caller is notified by means of a callback. In contrast, the synchronous network application means that after the caller initiates the scheduling, it does not perform other tasks and only waits for the result of the call. It can be seen that asynchronous network applications are a more efficient network communication method. [0003] With the rapid development of the Internet, various asynchronous network applications are constantly enriched. Therefore, higher and higher requirements are put forward for the stability and efficiency of netwo...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/46
Inventor 何林强周明伟张兴明傅利泉朱江明吴军吴坚
Owner ZHEJIANG DAHUA TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products