A multi-object blocking method and system thereof
A multi-object and queue technology, applied in the field of computer software applications, can solve the problem that threads cannot process pending tasks in time, and achieve the effect of reducing difficulty and simple implementation method
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0020] figure 1 A flow chart of a multi-object blocking method provided by the first embodiment of the present invention is shown, and the details are as follows:
[0021] Step S110, the system sends the task to be processed to the queue, and calls the pre-registered notification function on the queue;
[0022] A thread in a blocked state in the operating system can only wait for one pending task. When a pending task is received on a queue, the thread is awakened to process the pending task on the queue, and cannot continue to wait for other queues; However, a single thread often needs to be blocked in the semaphore and task queue or multiple task queues at the same time. When the thread receives a synchronization signal or a pending task, it needs to process the signal or pending task immediately.
[0023] Therefore, in this step, when the system calls the queue for task processing, it first calls a notification function with a function notification function preset on the qu...
Embodiment 2
[0036] figure 2 A structural diagram of a multi-object blocking system provided by the second embodiment of the present invention is shown, and the system can be applied to various terminals. For ease of description, only parts related to the embodiments of the present invention are shown. The details are as follows:
[0037] The multi-object blocking system includes: a function calling unit 210 , a notification function 220 , and a thread 230 . in:
[0038] A function calling unit 210, configured to send tasks to be processed to a queue, and call a pre-registered notification function on the queue;
[0039]When calling the queue for task processing, first call a notification function with function notification function preset on the queue. For example, through the function: yh_semaphore_send_notify(&sem1, notify_function), register a notification function notify_function to the semaphore sem1, and this notification function can be triggered when the user uses the functio...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com